fixed deploy.media initialize.environment call to get_config for the destination config, otherwise it overwrites the global env variable
modified: modules/deploy.py
This commit is contained in:
parent
b006e3d419
commit
0f56f81bf3
1 changed files with 26 additions and 9 deletions
|
|
@ -337,9 +337,13 @@ def media(source_branch):
|
||||||
|
|
||||||
import initialize
|
import initialize
|
||||||
|
|
||||||
print configuration.project.branch
|
print "project.branch: %s" % configuration.project.branch
|
||||||
|
|
||||||
configuration_src = initialize.environment(source_branch)
|
#
|
||||||
|
# if we use initialize.environemnt, we will overwrite all project
|
||||||
|
# information, using get_config instead
|
||||||
|
|
||||||
|
configuration_src = initialize.get_config(source_branch)
|
||||||
configuration_dst = configuration
|
configuration_dst = configuration
|
||||||
|
|
||||||
print "branch_src: %s" % configuration_src.project.branch
|
print "branch_src: %s" % configuration_src.project.branch
|
||||||
|
|
@ -389,10 +393,21 @@ def media(source_branch):
|
||||||
remote_dir = dynamic_dst
|
remote_dir = dynamic_dst
|
||||||
local_dir = dynamic_src
|
local_dir = dynamic_src
|
||||||
upstream = True
|
upstream = True
|
||||||
# configuration_dst = initialize.environment(
|
|
||||||
# destination_branch)
|
# TODO
|
||||||
|
# get rid of all this
|
||||||
|
#
|
||||||
|
# rsync relies on env.host_string to determine what the username and
|
||||||
|
# host is
|
||||||
|
# print "before: %s" % env.host_string
|
||||||
|
# configuration_dst = initialize.environment(source_branch)
|
||||||
|
# print "after: %s" % env.host_string
|
||||||
|
# import sys
|
||||||
|
# sys.exit()
|
||||||
|
|
||||||
print "upstream: %s" % upstream
|
print "upstream: %s" % upstream
|
||||||
|
print "remote_dir: %s" % remote_dir
|
||||||
|
print "local_dir: %s" % local_dir
|
||||||
print "\ncopy from {src} to {dst}\n".format(
|
print "\ncopy from {src} to {dst}\n".format(
|
||||||
src=configuration_src.project.host,
|
src=configuration_src.project.host,
|
||||||
dst=configuration_dst.project.host)
|
dst=configuration_dst.project.host)
|
||||||
|
|
@ -403,6 +418,8 @@ def media(source_branch):
|
||||||
upstream = False
|
upstream = False
|
||||||
|
|
||||||
print "upstream: %s" % upstream
|
print "upstream: %s" % upstream
|
||||||
|
print "remote_dir: %s" % remote_dir
|
||||||
|
print "local_dir: %s" % local_dir
|
||||||
print "\ncopy from {src} to {dst}\n".format(
|
print "\ncopy from {src} to {dst}\n".format(
|
||||||
src=configuration_src.project.host,
|
src=configuration_src.project.host,
|
||||||
dst=configuration_dst.project.host)
|
dst=configuration_dst.project.host)
|
||||||
|
|
@ -411,17 +428,17 @@ def media(source_branch):
|
||||||
return
|
return
|
||||||
|
|
||||||
cmd_msg = "rsync_project(remote_dir={remote_dir}, " \
|
cmd_msg = "rsync_project(remote_dir={remote_dir}, " \
|
||||||
"local_dir=local_dir, upload=upstream)".format(
|
"local_dir={local_dir}, upload={upstream})".format(
|
||||||
remote_dir=remote_dir,
|
remote_dir=remote_dir,
|
||||||
local_dir=local_dir,
|
local_dir=local_dir,
|
||||||
upstream=upstream)
|
upstream=upstream)
|
||||||
|
|
||||||
print cmd_msg
|
print cmd_msg
|
||||||
|
|
||||||
# from fabric.contrib.project import rsync_project
|
from fabric.contrib.project import rsync_project
|
||||||
# rsync_project(remote_dir=remote_dir,
|
rsync_project(remote_dir=remote_dir,
|
||||||
# local_dir=local_dir,
|
local_dir=local_dir,
|
||||||
# upload=upstream)
|
upload=upstream)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue