Skip to content

Commit

Permalink
Fixed all october depndencies to 1.0.419
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Sep 12, 2017
1 parent 95be111 commit 672cc09
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion october
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (file_exists(__DIR__.'/../../autoload.php')) {
require __DIR__.'/vendor/autoload.php';
}

$app = new Symfony\Component\Console\Application('October CMS Bootstrapper', '0.2.16');
$app = new Symfony\Component\Console\Application('October CMS Bootstrapper', '0.2.18');
$app->add(new \OFFLINE\Bootstrapper\October\Console\InitCommand);
$app->add(new \OFFLINE\Bootstrapper\October\Console\InstallCommand);
$app->run();
6 changes: 6 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('<comment>' . $e->getMessage() . '</comment>');
}

$output->writeln('<info>Fixing dependencies to build 419...</info>');
(new Composer())->requireVersion('october/rain', '1.0.419');
(new Composer())->requireVersion('october/system', '1.0.419');
(new Composer())->requireVersion('october/backend', '1.0.419');
(new Composer())->requireVersion('october/cms', '1.0.419');

$output->writeln('<info>Installing composer dependencies...</info>');
(new Composer())->install();
(new Composer())->addDependency('offline/oc-bootstrapper');
Expand Down
20 changes: 19 additions & 1 deletion src/Util/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function updateLock()
}

/**
* Composer require
* Composer require (if not already there)
*
* @return void
* @throws \Symfony\Component\Process\Exception\LogicException
Expand All @@ -91,4 +91,22 @@ public function addDependency($package)
->setTimeout(3600)
->run();
}

/**
* Composer require <package> <version>
*
* @return void
* @throws \Symfony\Component\Process\Exception\LogicException
* @throws \Symfony\Component\Process\Exception\RuntimeException
* @throws \Symfony\Component\Process\Exception\InvalidArgumentException
*/
public function requireVersion($package, $version)
{
$package = escapeshellarg($package);
$version = escapeshellarg($version);

(new Process($this->composer . ' require ' . $package . ' ' . $version . ' --no-interaction'))
->setTimeout(3600)
->run();
}
}

0 comments on commit 672cc09

Please sign in to comment.