diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3d899d4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,122 @@ +# Changelog + +All Notable changes to `digipolisgent/robo-digipolis-package`. + +## [Unreleased] + +### Fixed + +* [#12]: Use a temporary directory by default when creating an archive. + +### Added + +* Added this changelog file. + +## [0.1.6] + +### Changed + +* Added support for Symfony 4. + +## [0.1.5] + +### Fixed + +* Unit tests for PHP7. + +## [0.1.4] + +### Fixed + +* [#10]: Print the output of the compile commands. + +## [0.1.3] + +### Changed + +* Renamed argument `$command` to `$buildCommand` because Robo doesn't allow for +an argument named `$command`. + +### Fixed + +* [#7]: Added yarn support. + +## [0.1.2] + +### Changed + +* Updated NpmFindExecutable to search in the current working directory as well. + +## [0.1.1] + +### Fixed + +* [#4]: Rename cleanMirrorDir to prepareMirrorDir. + +## [0.1.0] + +### Changed + +* Improved output. +* Code style fixes. + +## [0.1.0-beta1] + +### Changed + +* Avoid adding the tar we're creating to the tar. +* Skip dot-folders (. and ..) when creating the tar. +* If the temporary directory is within the directory we're mirroring, don't +mirror the directory itself. +* Group addModify calls to Archive_Tar to improve performance. +* Better check for broken links when mirroring a directory. +* Do not try to remove the temporary directory if we didn't create one. +* Make the use of a temp dir optional. + +### Fixed + +* Fixed undefined variable notices. +* Fixed the useTmpDir option (logic was reversed). +* Fixed undefined variable target. +* Fixed undefined variable file. + +## [0.1.0-alpha3] + +### Changed + +* Updated the README with command documentation. + +### Added + +* Added commands for each task. +* Created traits for each command and task. + +## [0.1.0-alpha2] + +### Changed + +* Performance improvement: Use a temporary directory to create the archive. + +## [0.1.0-alpha1] + +### Added + +* Initial functionality. + +[Unreleased]: https://github.com/digipolisgent/php_package_successfactors-jobs/compare/master...develop +[0.1.6]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.5...0.1.6 +[0.1.5]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.4...0.1.5 +[0.1.4]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.3...0.1.4 +[0.1.3]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.2...0.1.3 +[0.1.2]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.1...0.1.2 +[0.1.1]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.0-beta1...0.1.0 +[0.1.0-beta1]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.0-alpha3...0.1.0-beta1 +[0.1.0-alpha3]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.0-alpha2...0.1.0-alpha3 +[0.1.0-alpha2]: https://github.com/digipolisgent/robo-digipolis-package/compare/0.1.0-alpha1...0.1.0-alpha2 +[0.1.0-alpha1]: https://github.com/digipolisgent/robo-digipolis-package/releases/tag/0.1.0-alpha1 + +[#12]: https://github.com/digipolisgent/robo-digipolis-package/issues/12 +[#10]: https://github.com/digipolisgent/robo-digipolis-package/issues/10 +[#7]: https://github.com/digipolisgent/robo-digipolis-package/issues/7 +[#4]: https://github.com/digipolisgent/robo-digipolis-package/issues/4 diff --git a/src/Commands/PackageProject.php b/src/Commands/PackageProject.php index c04849c..7bf231d 100644 --- a/src/Commands/PackageProject.php +++ b/src/Commands/PackageProject.php @@ -7,13 +7,14 @@ trait PackageProject use \DigipolisGent\Robo\Task\Package\Traits\PackageProjectTrait; - public function digipolisPackageProject($archiveFile, $dir = null, $opts = ['ignore|i' => '']) + public function digipolisPackageProject($archiveFile, $dir = null, $opts = ['ignore|i' => '', 'in-place' => false]) { if (is_callable([$this, 'readProperties'])) { $this->readProperties(); } $this->taskPackageProject($archiveFile, $dir) ->ignoreFileNames(array_map('trim', explode(',', $opts['ignore']))) + ->useTmpDir(!$opts['in-place']) ->run(); } } diff --git a/src/PackageProject.php b/src/PackageProject.php index e5ca5fb..c5e1c44 100644 --- a/src/PackageProject.php +++ b/src/PackageProject.php @@ -45,7 +45,7 @@ class PackageProject extends Pack * * @var bool */ - protected $useTmpDir = false; + protected $useTmpDir = true; /** diff --git a/tests/PackageProjectTest.php b/tests/PackageProjectTest.php index ec005bc..7fc5715 100644 --- a/tests/PackageProjectTest.php +++ b/tests/PackageProjectTest.php @@ -56,7 +56,10 @@ public function testRun() { $projectPath = realpath(__DIR__ . '/../testfiles'); $this->getConfig()->set('digipolis.root.project', $projectPath); - $result = $this->taskPackageProject($this->tarname)->run(); + $result = $this + ->taskPackageProject($this->tarname) + ->useTmpDir(false) + ->run(); // Assert response. $this->assertEquals('', $result->getMessage());