|
|
@ -17,6 +17,7 @@ use Composer\IO\IOInterface;
|
|
|
|
use Composer\DependencyResolver\Pool;
|
|
|
|
use Composer\DependencyResolver\Pool;
|
|
|
|
use Composer\Package\LinkConstraint\VersionConstraint;
|
|
|
|
use Composer\Package\LinkConstraint\VersionConstraint;
|
|
|
|
use Composer\Repository\CompositeRepository;
|
|
|
|
use Composer\Repository\CompositeRepository;
|
|
|
|
|
|
|
|
use Composer\Script\ScriptEvents;
|
|
|
|
|
|
|
|
|
|
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
|
@ -55,13 +56,20 @@ EOT
|
|
|
|
|
|
|
|
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return $this->archive(
|
|
|
|
$this->getComposer()->getEventDispatcher()->dispatchScript(ScriptEvents::PRE_ARCHIVE_CMD);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$returnCode = $this->archive(
|
|
|
|
$this->getIO(),
|
|
|
|
$this->getIO(),
|
|
|
|
$input->getArgument('package'),
|
|
|
|
$input->getArgument('package'),
|
|
|
|
$input->getArgument('version'),
|
|
|
|
$input->getArgument('version'),
|
|
|
|
$input->getOption('format'),
|
|
|
|
$input->getOption('format'),
|
|
|
|
$input->getOption('dir')
|
|
|
|
$input->getOption('dir')
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (0 === $returnCode) {
|
|
|
|
|
|
|
|
$this->getComposer()->getEventDispatcher()->dispatchScript(ScriptEvents::POST_ARCHIVE_CMD);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $returnCode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected function archive(IOInterface $io, $packageName = null, $version = null, $format = 'tar', $dest = '.')
|
|
|
|
protected function archive(IOInterface $io, $packageName = null, $version = null, $format = 'tar', $dest = '.')
|
|
|
|