Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def task_deploy():
- return {
- 'actions': ['do some deploy commands'],
- 'file_dep': ['dist'],
- 'params': [{'name': 'projectName',
- 'short': 'p',
- 'long': 'projectName',
- 'default': 'project',
- 'type': str,
- 'help': 'The project name to deploy.'}]
- }
- def task_create_distibution_archive():
- return {
- 'actions': ['do something that requires projectName'],
- 'doc': 'Creates a zip archive of the application in "dist"',
- 'targets': ['dist']
- }
- class ComplexCommonParams(object):
- def __init__(self):
- self.command = 'echo'
- params = ComplexCommonParams()
- commonCommand='echo'
- def task_x():
- global commonCommand
- return {
- 'actions': [ commonCommand + ' Hello2 > asdf' ],
- 'targets': ['asdf']
- }
- def task_y():
- global commonCommand
- return {
- 'actions': [ commonCommand+' World' ],
- 'file_dep': ['asdf'],
- 'verbosity':2}
Add Comment
Please, Sign In to add comment