Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
260771d5
Commit
260771d5
authored
Apr 15, 2016
by
Ernesto Rodriguez Ortiz
Browse files
Fix bug in the use of os.path and made hook_execute use the params.
parent
6d51163d
Changes
1
Hide whitespace changes
Inline
Side-by-side
helpers.py
View file @
260771d5
...
...
@@ -119,9 +119,9 @@ def fab_remove_from_hosts(site_hostname):
def
fab_update_container_ip
(
container_ip
):
local
(
'sed -i "/env.container_ip/d" {}/local_vars.py'
.
format
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))))
local
(
'sed -i "/env.container_ip/d" {}/local_vars.py'
.
format
(
path
.
dirname
(
path
.
abspath
(
__file__
))))
local
(
'sed -i "/# Docker auto-added container IP/a env.container_ip =
\'
{}
\'
" '
'{}/local_vars.py'
.
format
(
''
.
join
(
container_ip
),
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))))
'{}/local_vars.py'
.
format
(
''
.
join
(
container_ip
),
path
.
dirname
(
path
.
abspath
(
__file__
))))
def
fab_update_hosts
(
ip
,
site_hostname
):
...
...
@@ -135,15 +135,12 @@ def fab_update_hosts(ip, site_hostname):
fab_add_to_hosts
(
ip
,
site_hostname
)
def
hook_execute
(
hook
,
role
=
'docker'
):
def
hook_execute
(
cmds
=
env
.
hook_post_install
,
role
=
'docker'
):
"""
Execute a list of drush commands after the installation or update process
:param role Default 'role' where to run the task
:param cmds Drush commands to run, default to POST_INSTALL, it could be POST_UPDATE too.
"""
cmds
=
env
.
hook_post_install
for
cmd
in
cmds
:
with
fab_cd
(
role
,
env
.
docker_site_root
):
fab_run
(
role
,
cmd
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment