server/sbin/sync/fabfile.py
changeset 123 bd83fbd445ca
parent 121 cc05aad7e6b8
child 141 0d0883c6ec09
--- a/server/sbin/sync/fabfile.py	Mon Jun 08 00:12:29 2015 +0200
+++ b/server/sbin/sync/fabfile.py	Mon Jun 08 00:16:35 2015 +0200
@@ -19,18 +19,18 @@
         shutil.rmtree(env['temp_folder'])
 
 def get_version_path():
-    return os.path.join(env['temp_folder'], env['version'], env.source_rel_path)
+    return os.path.join(env['temp_folder'], env['version'])
 
 def export():
     local('hg archive -r %s %s' % (env['version'], get_version_path()) )
 
 def pack():
     # create a new source distribution as tarball
-    with lcd(get_version_path()):
+    with lcd(os.path.join(get_version_path(),env.source_rel_path)):
         local('python setup.py sdist --formats=gztar', capture=False)
 
 def create_virtualenv():
-    with lcd(get_version_path()):
+    with lcd(os.path.join(get_version_path(),env.source_rel_path)):
         tmpd = run('mktemp -d').strip()
         put('virtualenv/*.txt', tmpd)
         run('virtualenv -p %s %s' % (env.srv_python_location,env.srv_venv_path))
@@ -48,7 +48,7 @@
 
 def deploy():
     # figure out the release name and version
-    with lcd(get_version_path()):
+    with lcd(os.path.join(get_version_path(),env.source_rel_path)):
         dist = local('python setup.py --fullname', capture=True).strip()
         print(green("dist is %s" % dist))