[ARVADOS] updated: 1.3.0-2078-g3f1e7c7ce

Git user git at public.arvados.org
Thu Jan 16 19:51:16 UTC 2020


Summary of changes:
 sdk/cwl/arvados_version.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

       via  3f1e7c7cedc5ccb71c13fbe35981cd5394232574 (commit)
      from  19545d256d58a1ea71d127f2eb25443dcbd3db64 (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 3f1e7c7cedc5ccb71c13fbe35981cd5394232574
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Jan 16 14:49:49 2020 -0500

    Restore behavior to choose version from latest of python sdk or cwl
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
index 9aabff429..d9ce12487 100644
--- a/sdk/cwl/arvados_version.py
+++ b/sdk/cwl/arvados_version.py
@@ -7,8 +7,23 @@ import time
 import os
 import re
 
+SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
+
+def choose_version_from():
+    sdk_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../python")]).strip()
+    cwl_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', SETUP_DIR]).strip()
+    if int(sdk_ts) > int(cwl_ts):
+        getver = os.path.join(SETUP_DIR, "../python")
+    else:
+        getver = SETUP_DIR
+    return getver
+
 def git_version_at_commit():
-    curdir = os.path.dirname(os.path.abspath(__file__))
+    curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
     myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list