1
0
Fork 0

The ArchiveManager should return the written path for library usage

pull/1567/head
Nils Adermann 2013-02-25 16:25:24 +01:00
parent 48dd55b759
commit 935f7271f8
3 changed files with 4 additions and 1 deletions

View File

@ -118,6 +118,6 @@ class ArchiveManager
// Create the archive
$sourceRef = $package->getSourceReference();
$usableArchiver->archive($sourcePath, $target, $format, $sourceRef, $package->getArchiveExcludes());
return $usableArchiver->archive($sourcePath, $target, $format, $sourceRef, $package->getArchiveExcludes());
}
}

View File

@ -29,6 +29,8 @@ interface ArchiverInterface
* @param string $sourceRef The reference of the source to archive or null
* for the current reference
* @param array $excludes A list of patterns for files to exclude
*
* @return string The path to the written archive file
*/
public function archive($sources, $target, $format, $sourceRef = null, $excludes = array());

View File

@ -60,6 +60,7 @@ class PharArchiver implements ArchiverInterface
})
->ignoreVCS(true);
$phar->buildFromIterator($finder->getIterator(), $sources);
return $target;
} catch (\UnexpectedValueException $e) {
$message = sprintf("Could not create archive '%s' from '%s': %s",
$target,