The ArchiveManager should return the written path for library usage

main
Nils Adermann 12 years ago
parent 48dd55b759
commit 935f7271f8

@ -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());
}
}

@ -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());

@ -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,

Loading…
Cancel
Save