From 613dff0d4e7b165a921871af604f9116e32e8fa1 Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Thu, 27 Sep 2018 12:06:20 +0200 Subject: [PATCH 1/6] Fixes #12: Set useTmpDir to true. --- src/PackageProject.php | 2 +- tests/PackageProjectTest.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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()); From 40bfd6828500c16964f0389861eb4818d1931c9f Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Thu, 27 Sep 2018 12:13:15 +0200 Subject: [PATCH 2/6] Added the `--in-place` option to the package command. Since options can't have a default value of `true` (see https://robo.li/getting-started/#options), we had to revert the option for the command, so that it still uses the temporary directory to create the archive. --- src/Commands/PackageProject.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } } From e433e767f5ca9fdd965d012c4848b53e4369d492 Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Tue, 2 Oct 2018 12:44:08 +0200 Subject: [PATCH 3/6] Created CHANGELOG.md --- CHANGELOG.md | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f201ed8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,109 @@ +# Changelog + +All Notable changes to `digipolisgent/robo-digipolis-package`. + +## [Unreleased] + +## [0.1.6] + +### Changed + +* Added support for Symfony 4. + +## [0.1.5] + +### Changed + +* Fixed the unit tests for PHP7. + +## [0.1.4] + +### Added + +* 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`. + +### Added + +* Fixed [#7]: Added yarn support. + +## [0.1.2] + +### Changed + +* Updated NpmFindExecutable to search in the current working directory as well. + +## [0.1.1] + +### Changed + +* 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. +* Fixed undefined variable notices. +* 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. +* Fixed the useTmpDir option (logic was reversed). +* Do not try to remove the temporary directory if we didn't create one. +* Fixed undefined variable target. +* Fixed undefined variable file. +* Make the use of a temp dir optional. + + +## [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 + +[#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 From 5274fb8be1f1db42034c0b755fb3509700193e1c Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Tue, 2 Oct 2018 12:46:30 +0200 Subject: [PATCH 4/6] Updated CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f201ed8..bd3bb87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. ## [Unreleased] +### Changed + +* Fixed [#12]: Use a temporary directory by default when creating an archive. + +### Added + +* Added this changelog file. + ## [0.1.6] ### Changed @@ -104,6 +112,8 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. [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 From b8120e3c19dd0ad99bb2dfd4b27e60e7ab1ab110 Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Tue, 2 Oct 2018 12:57:53 +0200 Subject: [PATCH 5/6] Code style fixes to CHANGELOG.md. --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd3bb87..c738509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,8 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. ### Changed -* Renamed argument `$command` to `$buildCommand` because Robo doesn't allow for an argument named `$command`. +* Renamed argument `$command` to `$buildCommand` because Robo doesn't allow for +an argument named `$command`. ### Added @@ -66,7 +67,8 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. * Avoid adding the tar we're creating to the tar. * Skip dot-folders (. and ..) when creating the tar. * Fixed undefined variable notices. -* If the temporary directory is within the directory we're mirroring, don't mirror the directory itself. +* 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. * Fixed the useTmpDir option (logic was reversed). @@ -75,7 +77,6 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. * Fixed undefined variable file. * Make the use of a temp dir optional. - ## [0.1.0-alpha3] ### Changed @@ -112,7 +113,6 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. [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 From 71541a113d8166ca2eb8684b461b1f35782f5bc2 Mon Sep 17 00:00:00 2001 From: Jelle Sebreghts Date: Tue, 2 Oct 2018 14:23:45 +0200 Subject: [PATCH 6/6] Updated CHANGELOG.md Moved 'Fixed' lines to separate sections. --- CHANGELOG.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c738509..3d899d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. ## [Unreleased] -### Changed +### Fixed -* Fixed [#12]: Use a temporary directory by default when creating an archive. +* [#12]: Use a temporary directory by default when creating an archive. ### Added @@ -20,15 +20,15 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. ## [0.1.5] -### Changed +### Fixed -* Fixed the unit tests for PHP7. +* Unit tests for PHP7. ## [0.1.4] -### Added +### Fixed -* Fixed [#10]: Print the output of the compile commands. +* [#10]: Print the output of the compile commands. ## [0.1.3] @@ -37,9 +37,9 @@ All Notable changes to `digipolisgent/robo-digipolis-package`. * Renamed argument `$command` to `$buildCommand` because Robo doesn't allow for an argument named `$command`. -### Added +### Fixed -* Fixed [#7]: Added yarn support. +* [#7]: Added yarn support. ## [0.1.2] @@ -49,9 +49,9 @@ an argument named `$command`. ## [0.1.1] -### Changed +### Fixed -* Fixed [#4]: Rename cleanMirrorDir to prepareMirrorDir. +* [#4]: Rename cleanMirrorDir to prepareMirrorDir. ## [0.1.0] @@ -66,16 +66,19 @@ an argument named `$command`. * Avoid adding the tar we're creating to the tar. * Skip dot-folders (. and ..) when creating the tar. -* Fixed undefined variable notices. * 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. -* Fixed the useTmpDir option (logic was reversed). * 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. -* Make the use of a temp dir optional. ## [0.1.0-alpha3]