コード例 #1
0
ファイル: Application.php プロジェクト: piotrantosik/deployer
 /**
  * {@inheritdoc}
  */
 private function selfUpdateCommand()
 {
     $selfUpdate = new Command('self-update');
     $selfUpdate->setDescription('Updates deployer.phar to the latest version');
     $selfUpdate->setManifestUri('http://deployer.org/manifest.json');
     return $selfUpdate;
 }
コード例 #2
0
ファイル: Application.php プロジェクト: zroger/feather
 public function __construct()
 {
     parent::__construct('Feather', self::VERSION);
     $this->add(new Command\RunCommand());
     if (\Phar::running()) {
         $command = new AmendCommand('self-update');
         $command->setManifestUri('http://zroger.github.io/feather/manifest.json');
         $this->getHelperSet()->set(new AmendHelper());
         $this->add($command);
     }
 }
コード例 #3
0
ファイル: Application.php プロジェクト: jmverges/soup
 /**
  * @override
  */
 protected function getDefaultCommands()
 {
     $commands = parent::getDefaultCommands();
     $commands[] = new Command\Edit();
     if ('master' !== $this->getVersion()) {
         $command = new Amend\Command('update');
         $command->setManifestUri('https://raw.github.com/mneuhaus/soup/master/releases.json');
         $commands[] = $command;
     }
     return $commands;
 }
コード例 #4
0
ファイル: Bootstrap.php プロジェクト: shobcheye/sw-cli-tools
 /**
  * {@inheritdoc}
  */
 public function getConsoleCommands()
 {
     if (!$this->isPharFile()) {
         return array();
     }
     if ($this->checkUpdateOnRun()) {
         $this->runUpdate();
     }
     $manifest = $this->getManifestUrl();
     $command = new Command('update');
     $command->setManifestUri($manifest);
     return array($command);
 }
コード例 #5
0
ファイル: CommandTest.php プロジェクト: dvzzz/amend
 public function testExecuteCurrent()
 {
     $manifest = $this->createFile();
     file_put_contents($manifest, '[]');
     $command = new Command('upgrade', true);
     $command->setManifestUri($manifest);
     $app = new Application('Test', '1.0.0');
     $app->getHelperSet()->set(new Helper());
     $app->add($command);
     $tester = new CommandTester($app->get('upgrade'));
     $tester->execute(array('command' => 'upgrade'));
     $this->assertRegExp('/Already up-to-date\\./', $tester->getDisplay());
 }
コード例 #6
0
 /**
  * @override
  */
 protected function getDefaultCommands()
 {
     $commands = parent::getDefaultCommands();
     if (extension_loaded('phar')) {
         $commands[] = new Command\Add();
         $commands[] = new Command\Build();
         $commands[] = new Command\Extract();
         $commands[] = new Command\Info();
         $commands[] = new Command\Remove();
     }
     $commands[] = new Command\Key\Create();
     $commands[] = new Command\Key\Extract();
     $commands[] = new Command\Validate();
     $commands[] = new Command\Verify();
     if ('@' . 'git-version@' !== $this->getVersion()) {
         $command = new Amend\Command('update');
         $command->setManifestUri('@manifest_url@');
         $commands[] = $command;
     }
     return $commands;
 }
コード例 #7
0
#!/usr/bin/env php
<?php 
/*
 * This file is part of the Certificationy CLI application.
 *
 * (c) Vincent Composieux <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
require __DIR__ . '/vendor/autoload.php';
use Certificationy\Cli\Command\StartCommand;
use KevinGH\Amend\Command;
use KevinGH\Amend\Helper;
use Symfony\Component\Console\Application;
use Symfony\Component\Yaml\Yaml;
const VERSION = 1.4;
const APPLICATION_NAME = 'Certificationy';
$application = new Application(APPLICATION_NAME, VERSION);
$config = Yaml::parse(file_get_contents('config.yml'));
$updateCommand = new Command('self-update');
$updateCommand->setManifestUri($config['manifest_uri']);
$application->add($updateCommand);
$application->getHelperSet()->set(new Helper());
$startCommand = new StartCommand();
$application->add($startCommand);
$application->setDefaultCommand($startCommand->getName());
$application->run();
コード例 #8
0
ファイル: Application.php プロジェクト: raulastu/gush
 /**
  * @return \Symfony\Component\Console\Command\Command[]
  */
 public function getCommands()
 {
     $updateCommand = new UpdateCommand('core:update');
     $updateCommand->setManifestUri(self::MANIFESTO_FILE_URL);
     return [$updateCommand, new Cmd\HelpCommand(), new Cmd\PullRequest\PullRequestCreateCommand(), new Cmd\PullRequest\PullRequestMergeCommand(), new Cmd\PullRequest\PullRequestCloseCommand(), new Cmd\PullRequest\PullRequestPatOnTheBackCommand(), new Cmd\PullRequest\PullRequestAssignCommand(), new Cmd\PullRequest\PullRequestSwitchBaseCommand(), new Cmd\PullRequest\PullRequestSquashCommand(), new Cmd\PullRequest\PullRequestSemVerCommand(), new Cmd\PullRequest\PullRequestListCommand(), new Cmd\PullRequest\PullRequestLabelListCommand(), new Cmd\PullRequest\PullRequestMilestoneListCommand(), new Cmd\PullRequest\PullRequestFixerCommand(), new Cmd\PullRequest\PullRequestCheckoutCommand(), new Cmd\Util\DocumentationCommand(), new Cmd\Util\FabbotIoCommand(), new Cmd\Util\StyleCIPatchCommand(), new Cmd\Util\MetaHeaderCommand(), new Cmd\Util\MetaConfigureCommand(), new Cmd\Release\ReleaseCreateCommand(), new Cmd\Release\ReleaseListCommand(), new Cmd\Release\ReleaseRemoveCommand(), new Cmd\Issue\IssueTakeCommand(), new Cmd\Issue\IssueCreateCommand(), new Cmd\Issue\IssueCloseCommand(), new Cmd\Issue\IssueAssignCommand(), new Cmd\Issue\IssueLabelListCommand(), new Cmd\Issue\IssueMilestoneListCommand(), new Cmd\Issue\IssueShowCommand(), new Cmd\Issue\IssueCopyCommand(), new Cmd\Issue\IssueListCommand(), new Cmd\Issue\LabelIssuesCommand(), new Cmd\Branch\BranchPushCommand(), new Cmd\Branch\BranchMergeCommand(), new Cmd\Branch\BranchSyncCommand(), new Cmd\Branch\BranchDeleteCommand(), new Cmd\Branch\BranchForkCommand(), new Cmd\Branch\BranchChangelogCommand(), new Cmd\Branch\BranchRemoteAddCommand(), new Cmd\Core\CoreConfigureCommand(), new Cmd\Core\CoreAliasCommand(), new Cmd\Core\CoreClearCommand(), new Cmd\Core\InitCommand(), new Cmd\Core\AutocompleteCommand(), new Cmd\Repository\RepositoryCreateCommand()];
 }
コード例 #9
0
ファイル: Application.php プロジェクト: tonydub/jarvis
 /**
  * @{inheritdoc}
  */
 protected function getDefaultCommands()
 {
     $commands = parent::getDefaultCommands();
     if ('@' . 'git-version@' !== $this->getVersion()) {
         $command = new Amend\Command('core:update');
         $command->setAliases(['self-update']);
         $command->setManifestUri('@manifest_url@');
         $commands[] = $command;
     }
     return $commands;
 }
コード例 #10
0
ファイル: app.php プロジェクト: jaggedsoft/cloudflare-cli
$app->register(new GuzzleServiceProvider(), array('guzzle.services' => __DIR__ . '/services.json'));
// package_version si managed by phar builder
$app->register(new ConsoleServiceProvider(), array('console.name' => 'CloudFlare CLI', 'console.version' => '@package_version@', 'console.project_directory' => __DIR__ . '/..'));
$console = $app['console'];
$console->add(new Cloudflare\Command\PurgeCacheCommand($app, 'cache:purge'));
$console->add(new Cloudflare\Command\DnsGetCommand($app, 'dns:list'));
// TODO
$console->add(new Cloudflare\Command\DnsAddCommand($app, 'dns:add'));
// $console->add(new Cloudflare\Command\DnsUpdateCommand($app, 'dns:update'));
// $console->add(new Cloudflare\Command\DnsDeleteCommand($app, 'dns:delete'));
//
// $console->add(new Cloudflare\Command\VistorRecentCommand($app, 'visitor:recent'));
// $console->add(new Cloudflare\Command\VisitorScoreCommand($app, 'visitor:score'));
// $console->add(new Cloudflare\Command\VisitorWhitelistCommand($app, 'visitor:whitelist'));
// $console->add(new Cloudflare\Command\VisitorBanCommand($app, 'visitor:ban'));
// $console->add(new Cloudflare\Command\VisitorUnbanCommand($app, 'visitor:unban'));
//
$console->add(new Cloudflare\Command\ZoneListCommand($app, 'zone:list'));
$console->add(new Cloudflare\Command\ZoneDetailsCommand($app, 'zone:details'));
$console->add(new Cloudflare\Command\ZoneGetCommand($app, 'zone:get'));
// security-level, cache-level, ipv6, devmode, rocket-loader, minify, mirage
// $console->add(new Cloudflare\Command\ZoneSetCommand($app, 'zone:set'));
$console->add(new Cloudflare\Command\ZoneSetDevModeCommand($app, 'dev:on'));
$console->add(new Cloudflare\Command\ZoneSetDevModeCommand($app, 'dev:off'));
//
// $console->add(new Cloudflare\Command\StatsGetCommand($app, 'stats:get'));
$updateCommand = new Command('update');
$updateCommand->setManifestUri('https://raw.githubusercontent.com/lorello/cloudflare-cli/master/versions.json');
$console->getHelperSet()->set(new Helper());
$console->add($updateCommand);
#$console->add(new Cloudflare\Command\OpenIssueCommand($app, 'issue:open'));