1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +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();
$workflows = array(
new PhabricatorCacheManagementPurgeWorkflow(),
new PhutilHelpArgumentWorkflow(),
);
$workflows = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorCacheManagementWorkflow')
->loadObjects();
$workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows);

View file

@ -15,16 +15,9 @@ $args->setSynopsis(<<<EOSYNOPSIS
EOSYNOPSIS
);
$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);

View file

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