def define_preset_tasks(module, config):
''' Define tasks for the configured deployment preset. '''
deployment = deployer.import_preset(config)
# Now that we have deployment preset set, import all the tasks.
for (task_name, func) in deployment.__dict__.iteritems():
if not _is_task(func):
continue
# Set a new task named as the stage name in the main fabfile module.
setattr(module, task_name, func)
评论列表
文章目录