[ARVADOS] created: 1.1.4-485-gfa4fc4f45

Git user git at public.curoverse.com
Tue Jun 19 15:53:49 EDT 2018


        at  fa4fc4f452c5b29427512758f4bd14df2fcc3c42 (commit)


commit fa4fc4f452c5b29427512758f4bd14df2fcc3c42
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Jun 19 15:53:02 2018 -0400

    13638: Restore logic of arvados-cwl-runner version is max(sdk, acr)
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
index 13e6d36c0..88cf1ed7c 100644
--- a/sdk/cwl/arvados_version.py
+++ b/sdk/cwl/arvados_version.py
@@ -7,15 +7,30 @@ import time
 import os
 import re
 
+SETUP_DIR = os.path.dirname(__file__) or '.'
+
 def git_latest_tag():
     gitinfo = subprocess.check_output(
         ['git', 'describe', '--abbrev=0']).strip()
     return str(gitinfo.decode('utf-8'))
 
+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_timestamp_tag():
     gitinfo = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
-         '--format=format:%ct', '.']).strip()
+         '--format=format:%ct', choose_version_from()]).strip()
     return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
 
 def save_version(setup_dir, module, v):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list