Commit aeb7befe authored by 20th (Victor Nikulshin)'s avatar 20th (Victor Nikulshin)
Browse files

Move 'deploy' command into deploy.py

If function 'deploy' is defined in __init__.py it masks the imported module
with the same name. Placing it into deploy.py file is more logical
structure-wise.

To make sure that the command is still accessible by its old name, it is marked
as a default task for 'deploy' module.
parent 4821cbb4
......@@ -76,13 +76,3 @@ def release():
execute(drush.archive_dump)
execute(drush.gen_doc)
@task
def deploy(environment):
"""Deploy code and run database updates on a target Drupal environment.
"""
execute(provision, environment)
execute(push, environment, hosts=env.hosts)
execute(migrate, environment, hosts=env.hosts)
......@@ -156,6 +156,16 @@ def _aegir_remove_platform_without_sites(target, environment, platform):
run('{}/remove-platforms {} {}'.format(aegir_path, environment, platform))
@task(default=True)
def deploy(environment):
"""Deploy code and run database updates on a target Drupal environment.
"""
execute(provision, environment)
execute(push, environment, hosts=env.hosts)
execute(migrate, environment, hosts=env.hosts)
@task
def provision(environment, role='local'):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment