 ce78bf1de4
			
		
	
	ce78bf1de4
	
	
	
		
			
			Summary: Ref T2015. Not directly related to Drydock, but I bumped into this. All these scripts currently enumerate their workflows explicitly. Instead, use `PhutilSymbolLoader` to automatically discover workflows. This reduces code duplication and errors (see all the bad `extends` this diff fixes) and lets third parties add new workflows (not clearly valuable?). Test Plan: Ran `bin/x help` for each modified script. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2015 Differential Revision: https://secure.phabricator.com/D7840
		
			
				
	
	
		
			22 lines
		
	
	
		
			566 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			566 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env php
 | |
| <?php
 | |
| 
 | |
| $root = dirname(dirname(dirname(__FILE__)));
 | |
| require_once $root.'/scripts/__init_script__.php';
 | |
| 
 | |
| $args = new PhutilArgumentParser($argv);
 | |
| $args->setTagline('manage Harbormaster');
 | |
| $args->setSynopsis(<<<EOSYNOPSIS
 | |
| **harbormaster** __command__ [__options__]
 | |
|   Manage and debug Harbormaster.
 | |
| 
 | |
| EOSYNOPSIS
 | |
|   );
 | |
| $args->parseStandardArguments();
 | |
| 
 | |
| $workflows = id(new PhutilSymbolLoader())
 | |
|   ->setAncestorClass('HarbormasterManagementWorkflow')
 | |
|   ->loadObjects();
 | |
| $workflows[] = new PhutilHelpArgumentWorkflow();
 | |
| $args->parseWorkflows($workflows);
 |