2019-10-03 16:26:44 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
def action_extensions(base_actions, project_path=os.getcwd()):
|
|
|
|
def test_callback(ut_apply_config_name, ctx, args):
|
|
|
|
print("!!! From test_subcommand")
|
|
|
|
|
|
|
|
def test_global_callback(ctx, global_args, tasks):
|
|
|
|
print("!!! From test global callback: %s" % global_args.test_extension_option)
|
|
|
|
|
|
|
|
return {
|
|
|
|
"global_options": [{
|
|
|
|
"names": ["--test-extension-option"],
|
|
|
|
"help": "Help for option --test-extension-option",
|
|
|
|
"default": "test",
|
|
|
|
}],
|
|
|
|
"global_action_callbacks": [test_global_callback],
|
|
|
|
"actions": {
|
|
|
|
"test_subcommand": {
|
|
|
|
"callback": test_callback,
|
|
|
|
"help": "Help for test subcommand.",
|
|
|
|
},
|
2019-11-08 16:54:10 +00:00
|
|
|
"hidden_one": {
|
|
|
|
"callback": test_callback,
|
|
|
|
"hidden": True
|
|
|
|
}
|
|
|
|
}
|
2019-10-03 16:26:44 +00:00
|
|
|
}
|