Commit 502b26a4 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

Merge branch 'fix/drush_aliases' into '3.x'

Fix/drush aliases

See merge request !42
parents e697af09 8f0db828
Pipeline #7030 failed with stages
in 41 seconds
...@@ -76,16 +76,12 @@ def aliases(): ...@@ -76,16 +76,12 @@ def aliases():
drush_aliases = env.site_drush_aliases drush_aliases = env.site_drush_aliases
workspace = env.workspace workspace = env.workspace
if not os.path.exists(drush_aliases): dk_run(env.services['php'], user='root',
dk_run(env.services['php'], user='root', cmd='if [ ! -e {} ]; then mkdir {}; fi;'.format(drush_aliases, drush_aliases))
cmd='mkdir {}'.format(drush_aliases))
if os.path.exists('{}/aliases.drushrc.php'.format(drush_aliases)):
dk_run(env.services['php'], user='root',
cmd='rm {}/aliases.drushrc.php'.format(drush_aliases))
if os.path.exists('{}/conf/aliases.drushrc.php'.format(workspace)): if os.path.exists('{}/conf/aliases.drushrc.php'.format(workspace)):
dk_run(env.services['php'], user='root', dk_run(env.services['php'], user='root',
cmd='cp {}/conf/aliases.drushrc.php {}/'.format(workspace, cmd='cp --force {}/conf/aliases.drushrc.php {}/'.format(workspace,
drush_aliases)) drush_aliases))
print(green('Drush aliases have been copied to {} directory.' print(green('Drush aliases have been copied to {} directory.'
''.format(drush_aliases))) ''.format(drush_aliases)))
......
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