[ARVADOS] updated: 1.1.3-264-gc76c24b
Git user
git at public.curoverse.com
Fri Mar 23 16:03:32 EDT 2018
Summary of changes:
build/run-library.sh | 2 +-
sdk/python/{gittaggers.py => arvados_version.py} | 13 ++-----------
sdk/python/setup.py | 6 +++---
3 files changed, 6 insertions(+), 15 deletions(-)
copy sdk/python/{gittaggers.py => arvados_version.py} (57%)
via c76c24b41b37b401728037fe125d3c677845ee82 (commit)
from da5fc73ae34630538dd653a0cba702a6e79470a9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c76c24b41b37b401728037fe125d3c677845ee82
Author: Javier Bértoli <jbertoli at veritasgenetics.com>
Date: Fri Mar 23 17:02:57 2018 -0300
Add functions to return the python version for packaging
refs #13200
Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at veritasgenetics.com>
diff --git a/build/run-library.sh b/build/run-library.sh
index 238d6d6..77ea465 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -277,7 +277,7 @@ test_package_presence() {
fi
repo_pkg_list=$(curl -o - http://apt.arvados.org/pool/${D}/main/${repo_subdir}/)
- echo ${repo_pkg_list} |grep -q ${pkgname}
+ echo ${repo_pkg_list} |grep -q ${complete_pkgname}
if [ $? -eq 0 ]; then
echo "Package $complete_pkgname exists, not rebuilding!"
curl -o ./${complete_pkgname} http://apt.arvados.org/pool/${D}/main/${repo_subdir}/${complete_pkgname}
diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
new file mode 100644
index 0000000..bc8ce73
--- /dev/null
+++ b/sdk/python/arvados_version.py
@@ -0,0 +1,20 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import subprocess
+import time
+
+class VersionInfoFromGit():
+ """Return arvados version from git
+ """
+ def git_latest_tag(self):
+ gitinfo = subprocess.check_output(
+ ['git', 'describe', '--abbrev=0']).strip()
+ return str(gitinfo)
+
+ def git_timestamp_tag(self):
+ gitinfo = subprocess.check_output(
+ ['git', 'log', '--first-parent', '--max-count=1',
+ '--format=format:%ct', '.']).strip()
+ return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 88bf51e..1adc19f 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -15,10 +15,10 @@ README = os.path.join(SETUP_DIR, 'README.rst')
tagger = egg_info_cmd.egg_info
version = os.environ.get("ARVADOS_BUILDING_VERSION")
if not version:
- version = "0.1"
try:
- import gittaggers
- tagger = gittaggers.EggInfoFromGit
+ import arvados_version
+ vtag = arvados_version.VersionInfoFromGit()
+ version = vtag.git_latest_tag() + vtag.git_timestamp_tag()
except ImportError:
pass
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list