Commit f2cb5d33 authored by Samuel Sirois's avatar Samuel Sirois
Browse files

Add git status check on "dangerous" tasks (init, install)

parent 06a55f63
...@@ -18,12 +18,15 @@ def init(): ...@@ -18,12 +18,15 @@ def init():
Complete local installation process, used generally when building the docker image for install and configure Drupal. Complete local installation process, used generally when building the docker image for install and configure Drupal.
""" """
execute(docker.image_create) if (git.isGitDirty()):
execute(docker.container_start) if (confirm(red('There are warnings on status of your repositories. '
execute(drush.make, 'install') 'Do you want to continue and reset all changes to remote repositories'' states?'), default=False)):
execute(drush.site_install, host='root@{}'.format(env.container_ip)) execute(docker.image_create)
execute(drush.aliases) execute(docker.container_start)
execute(behat.init, host='root@{}'.format(env.container_ip)) execute(drush.make, 'install')
execute(drush.site_install, host='root@{}'.format(env.container_ip))
execute(drush.aliases)
execute(behat.init, host='root@{}'.format(env.container_ip))
...@@ -48,9 +51,12 @@ def install(): ...@@ -48,9 +51,12 @@ def install():
Run the full installation process. Run the full installation process.
""" """
execute(drush.make, 'install') if (git.isGitDirty()):
execute(drush.site_install) if (confirm(red('There are warnings on status of your repositories. '
execute(behat.init) 'Do you want to continue and reset all changes to remote repositories'' states?'), default=False)):
execute(drush.make, 'install')
execute(drush.site_install)
execute(behat.init)
......
Markdown is supported
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