Skip to content
GitLab
Menu
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
10c7f2f9
Commit
10c7f2f9
authored
Dec 06, 2016
by
Victor Nikulshin
Browse files
Clear cached bytecode file after local_vars.py modification
parent
79f1e301
Pipeline
#1724
passed with stages
in 2 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
helpers.py
View file @
10c7f2f9
...
...
@@ -136,9 +136,12 @@ 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
(
path
.
dirname
(
path
.
abspath
(
__file__
))))
local
(
'sed -i "/# Docker auto-added container IP/a env.container_ip =
\'
{}
\'
" '
'{}/local_vars.py'
.
format
(
''
.
join
(
container_ip
),
path
.
dirname
(
path
.
abspath
(
__file__
))))
local
(
'sed -i "/env.container_ip/d" {}'
.
format
(
fab_path
(
'local_vars.py'
)))
local
(
'sed -i "/# Docker auto-added container IP/a env.container_ip =
\'
{}
\'
" {}'
.
format
(
''
.
join
(
container_ip
),
fab_path
(
'local_vars.py'
)))
if
os
.
path
.
exists
(
fab_path
(
'local_vars.pyc'
)):
# Clear cached bytecode file
os
.
remove
(
fab_path
(
'local_vars.pyc'
))
def
fab_update_hosts
(
ip
,
site_hostname
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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