mirror of
https://github.com/getgrav/grav.git
synced 2026-03-06 20:41:36 +01:00
Vendors get now installed via composer automatically through first run of GPM or Grav cli.
This commit is contained in:
7
bin/grav
7
bin/grav
@@ -5,6 +5,13 @@ if (version_compare($ver = PHP_VERSION, $req = '5.4.0', '<')) {
|
||||
exit(sprintf("You are running PHP %s, but Grav needs at least PHP %s to run.\n", $ver, $req));
|
||||
}
|
||||
|
||||
if (!file_exists(__DIR__ . '/../vendor')){
|
||||
// Before we can even start, we need to run composer first
|
||||
echo "Preparing to install vendor dependencies...\n\n";
|
||||
echo system('php bin/composer.phar --working-dir="'.__DIR__.'/../" --no-interaction install');
|
||||
echo "\n\n";
|
||||
}
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
require_once(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
@@ -54,8 +54,7 @@ class InstallCommand extends Command {
|
||||
|
||||
if (file_exists($local_config_file)) {
|
||||
$this->local_config = Yaml::parse($local_config_file);
|
||||
$output->writeln('');
|
||||
$output->writeln('read local config from <cyan>' . $local_config_file . '</cyan>');
|
||||
$output->writeln('Read local config from <cyan>' . $local_config_file . '</cyan>');
|
||||
}
|
||||
|
||||
// Look for dependencies file in ROOT and USER dir
|
||||
@@ -67,6 +66,10 @@ class InstallCommand extends Command {
|
||||
$output->writeln('<red>ERROR</red> Missing .dependencies file in <cyan>user/</cyan> folder');
|
||||
}
|
||||
|
||||
// Updates composer first
|
||||
$output->writeln("\nInstalling vendor dependencies");
|
||||
$output->writeln(system('php bin/composer.phar --working-dir="'.$this->destination.'" --no-interaction update'));
|
||||
|
||||
// If yaml config, process
|
||||
if ($this->config) {
|
||||
if (!$input->getOption('symlink')) {
|
||||
|
||||
Reference in New Issue
Block a user