# HG changeset patch # User ymh # Date 1472660539 -7200 # Node ID f014c1593ade01dbed18cc1722273185c7e050a0 # Parent 67c0561598f65d30add72e8d4766fc078680b7c9 smal modification to get version diff -r 67c0561598f6 -r f014c1593ade sbin/sync/fabfile.py --- a/sbin/sync/fabfile.py Wed Aug 31 17:39:31 2016 +0200 +++ b/sbin/sync/fabfile.py Wed Aug 31 18:22:19 2016 +0200 @@ -6,16 +6,16 @@ from fablib import (export_version, do_sync_web, create_config, clean_export_folder, do_sync_comp, sync_install_build, do_create_virtualenv, clean_rsync_folder, rsync_export, get_src_version, sync_build, - do_relaunch_server, install_build, do_create_virtualenv_requirement) + do_relaunch_server, install_build, do_create_virtualenv_requirement, build_src) from fabric.api import task, env from fabric.colors import green def build_source(version): print(green("build source with version %s" % version)) export_path = export_version(iconolab=version) - export_path_full = os.path.join(export_path,'src') + export_path_full = os.path.join(export_path, env.key, env.repos[env.key]['src_root']) build_src(export_path_full) - (_,version_str) = get_src_version(env.key, src_path) + (_,version_str) = get_src_version(env.key, export_path_full) return os.path.join(src_path,"dist","%s-%s.tar.gz" % (env.key,version_str)) @task diff -r 67c0561598f6 -r f014c1593ade src/iconolab/__init__.py --- a/src/iconolab/__init__.py Wed Aug 31 17:39:31 2016 +0200 +++ b/src/iconolab/__init__.py Wed Aug 31 18:22:19 2016 +0200 @@ -5,8 +5,10 @@ ### # https://github.com/django/django/blob/1.9.1/django/utils/version.py # -def get_version(version): +def get_version(version=None): "Returns a PEP 440-compliant version number from VERSION." + if not version: + version = VERSION version = get_complete_version(version) # Now build the two parts of the version number: