--- a/sbin/sync/fabfile.py Wed Jun 13 15:10:35 2012 +0200
+++ b/sbin/sync/fabfile.py Wed Jun 13 16:36:52 2012 +0200
@@ -165,6 +165,10 @@
build_src(src_path)
(_,version_str) = get_src_version(src_path)
build_path = os.path.join(src_path,"dist","ldt-%s.tar.gz" % version_str)
+ sync_install_build(build_path)
+
+
+def sync_install_build(build_path):
res_trans = None
try:
res_trans = sync_build(build_path)
@@ -173,6 +177,7 @@
if res_trans:
remove_build(res_trans[0])
+
def do_sync_web(version, export_path):
print("do_sync_web with version %s and path %s" % (version,export_path))
web_path = os.path.join(export_path,"web/")
@@ -198,8 +203,25 @@
export_path = export_version(version)
do_sync_ldt(version, export_path)
clean_export_folder(export_path)
- relaunch_server()
-
+ relaunch_server()
+
+@task
+def update_ldt(version):
+ print(green("update ldt with version %s" % version))
+ export_path = export_version(version)
+ lib_path = os.path.join(export_path, "virtualenv", "res", "lib")
+
+ f, pathname, description = imp.find_module("patch", [lib_path])
+ patch = imp.load_module("patch", f, pathname, description)
+ f, pathname, description = imp.find_module("lib_create_env", [lib_path])
+ lib_create_env = imp.load_module("lib_create_env", f, pathname, description)
+
+ ldt_path = os.path.join(export_path, "virtualenv", "res", "src", lib_create_env.URLS['LDT']['local'])
+
+ sync_install_build(ldt_path)
+ clean_export_folder(export_path)
+ relaunch_server()
+
@task
def sync_platform(version):
print(green("sync platform with version %s" % version))