#NEWLINE# def register_command_line( self , sub_parsers ) : #NEWLINE# #INDENT# parser = sub_parsers . add_parser ( 'utils' , help = 'Developer support tools.' , description = 'Developer support tools.  Run with the -v1 flag to suppress extra printing.  EG: "servi -v1 utils --render_servifiles"' ) #NEWLINE# parser . add_argument ( '-m' , '--ensure_latest_manifest' , action = 'store_true' , help = 'Ensures the latest manifest is you your master directory. If not, it copies it there and exits with an error 1. Good for a pre-commit hook.  Eg: "servi -v0 utils ensure_latest_manifest"' ) #NEWLINE# parser . add_argument ( '--bump' , choices = SEMANTIC_VERSIONS , help = 'Bump the version' ) #NEWLINE# parser . add_argument ( '-s' , '--set_ver' , type = str , help = 'Set template version to <string>' ) #NEWLINE# parser . add_argument ( '-r' , '--render_servifiles' , action = 'store_true' , help = 'Render the servifile templates, filling in all values' ) #NEWLINE# parser . add_argument ( '--combined_rendered_servifile' , action = 'store_true' , help = 'Similar to --render_servifiles but only outputs the combinedconfiguration and nothing else (as JSON).' ) #NEWLINE# parser . add_argument ( '-e' , '--ensure_latest_globals_in_git' , action = 'store_true' , help = 'Ensures that a current copy of ~/Servifile_globals.yml is stored in the root of your repo. If not, it copies it there and exits with an error 1. Good for a pre-commit hook.  Eg: "servi -v0 utils ensure_latest_globals_in_git"' ) #NEWLINE# parser . add_argument ( '--servi_dir' , action = 'store_true' , help = 'Prints the directory of Servifile.yml ' ) #NEWLINE# parser . add_argument ( '--in_servi_dir' , action = 'store_true' , help = 'Exits with 0 if in servi code dir.' ) #NEWLINE# parser . add_argument ( '-l' , '--link_githook' , action = 'store_true' , help = "Add (link) servi's pre-commit hook to your git repository. In the servi source tree, this will update the template manifest and version if needed. In a tree that uses servi, this will copy your Servifile_globals.yml to your repo" ) #NEWLINE# parser . set_defaults ( command_func = self . run ) #NEWLINE# self . parser = sub_parsers #NEWLINE# self . arglist = [ arg . dest for arg in parser . _optionals . _actions if ( arg . dest != 'help' ) ]