Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12: Set useTmpDir to true. #13

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/Commands/PackageProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
2 changes: 1 addition & 1 deletion src/PackageProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PackageProject extends Pack
*
* @var bool
*/
protected $useTmpDir = false;
protected $useTmpDir = true;


/**
Expand Down
5 changes: 4 additions & 1 deletion tests/PackageProjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down