Commit 1b52398d authored by Victor Nikulshin's avatar Victor Nikulshin

Merge branch '2.x-feature/clear-pyc' into '2.x'

Clear cached bytecode file after local_vars.py modification



See merge request !37
parents 79f1e301 10c7f2f9
Pipeline #1730 passed with stages
in 1 minute and 1 second
......@@ -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):
......
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