Skip to content
Extraits de code Groupes Projets
Valider 20f5a0e4 rédigé par mattab's avatar mattab
Parcourir les fichiers

Merge remote-tracking branch 'origin/master'

parents 3aa0bf62 bb679398
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,6 +13,7 @@ namespace Piwik; ...@@ -13,6 +13,7 @@ namespace Piwik;
use Piwik\Plugins\CoreConsole\GenerateApi; use Piwik\Plugins\CoreConsole\GenerateApi;
use Piwik\Plugins\CoreConsole\GenerateController; use Piwik\Plugins\CoreConsole\GenerateController;
use Piwik\Plugins\CoreConsole\GeneratePlugin; use Piwik\Plugins\CoreConsole\GeneratePlugin;
use Piwik\Plugins\CoreConsole\GitPull;
use Piwik\Plugins\CoreConsole\RunTests; use Piwik\Plugins\CoreConsole\RunTests;
use Piwik\Plugins\CoreConsole\WatchLog; use Piwik\Plugins\CoreConsole\WatchLog;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
...@@ -28,6 +29,7 @@ class Console ...@@ -28,6 +29,7 @@ class Console
$console->add(new GenerateApi()); $console->add(new GenerateApi());
$console->add(new GenerateController()); $console->add(new GenerateController());
$console->add(new WatchLog()); $console->add(new WatchLog());
$console->add(new GitPull());
$console->run(); $console->run();
} }
......
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package CoreConsole
*/
namespace Piwik\Plugins\CoreConsole;
use Piwik\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* @package CoreConsole
*/
class GitPull extends Command
{
protected function configure()
{
$this->setName('git:pull');
$this->setDescription('Pull Piwik repo and all submodules');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$cmd = sprintf('cd %s && git checkout master && git pull && git submodule update --init --recursive', PIWIK_DOCUMENT_ROOT);
$output->writeln('Executing command: ' . $cmd);
passthru($cmd);
}
}
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter