1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Discover workflows automatically.

Summary: Most scripts detect the relevant workflows automatically. Some scripts, however, use a hardcoded list of workflows.

Test Plan: Ran `./bin/aphlict`, `./bin/cache` and `./bin/phd`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9564
This commit is contained in:
Joshua Spence 2014-06-16 09:00:25 +10:00
parent a3c8b1e746
commit 97bb13d1d7
3 changed files with 13 additions and 25 deletions

View file

@ -14,9 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = array( $workflows = id(new PhutilSymbolLoader())
new PhabricatorCacheManagementPurgeWorkflow(), ->setAncestorClass('PhabricatorCacheManagementWorkflow')
new PhutilHelpArgumentWorkflow(), ->loadObjects();
); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -15,16 +15,9 @@ $args->setSynopsis(<<<EOSYNOPSIS
EOSYNOPSIS EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = array(
new PhabricatorDaemonManagementListWorkflow(),
new PhabricatorDaemonManagementStatusWorkflow(),
new PhabricatorDaemonManagementStartWorkflow(),
new PhabricatorDaemonManagementStopWorkflow(),
new PhabricatorDaemonManagementRestartWorkflow(),
new PhabricatorDaemonManagementLaunchWorkflow(),
new PhabricatorDaemonManagementDebugWorkflow(),
new PhabricatorDaemonManagementLogWorkflow(),
new PhutilHelpArgumentWorkflow(),
);
$workflows = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorDaemonManagementWorkflow')
->loadObjects();
$workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -16,12 +16,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$args->parseWorkflows(array( $workflows = id(new PhutilSymbolLoader())
new PhabricatorAphlictManagementStatusWorkflow(), ->setAncestorClass('PhabricatorAphlictManagementWorkflow')
new PhabricatorAphlictManagementStartWorkflow(), ->loadObjects();
new PhabricatorAphlictManagementStopWorkflow(), $workflows[] = new PhutilHelpArgumentWorkflow();
new PhabricatorAphlictManagementRestartWorkflow(), $args->parseWorkflows($workflows);
new PhabricatorAphlictManagementDebugWorkflow(),
new PhabricatorAphlictManagementBuildWorkflow(),
new PhutilHelpArgumentWorkflow(),
));