Guest User

Untitled

a guest
Jan 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. def task_deploy():
  2. return {
  3. 'actions': ['do some deploy commands'],
  4. 'file_dep': ['dist'],
  5. 'params': [{'name': 'projectName',
  6. 'short': 'p',
  7. 'long': 'projectName',
  8. 'default': 'project',
  9. 'type': str,
  10. 'help': 'The project name to deploy.'}]
  11. }
  12.  
  13. def task_create_distibution_archive():
  14. return {
  15. 'actions': ['do something that requires projectName'],
  16. 'doc': 'Creates a zip archive of the application in "dist"',
  17. 'targets': ['dist']
  18. }
  19.  
  20. class ComplexCommonParams(object):
  21. def __init__(self):
  22. self.command = 'echo'
  23. params = ComplexCommonParams()
  24. commonCommand='echo'
  25. def task_x():
  26. global commonCommand
  27. return {
  28. 'actions': [ commonCommand + ' Hello2 > asdf' ],
  29. 'targets': ['asdf']
  30. }
  31. def task_y():
  32. global commonCommand
  33. return {
  34. 'actions': [ commonCommand+' World' ],
  35. 'file_dep': ['asdf'],
  36. 'verbosity':2}
Add Comment
Please, Sign In to add comment