[ARVADOS] updated: 1.1.3-267-g3c667d5

Git user git at public.curoverse.com
Mon Mar 26 09:44:17 EDT 2018


Summary of changes:
 sdk/{python => cwl}/arvados_version.py | 0
 sdk/cwl/gittaggers.py                  | 2 +-
 sdk/cwl/setup.py                       | 6 +++---
 sdk/python/gittaggers.py               | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
 copy sdk/{python => cwl}/arvados_version.py (100%)

       via  3c667d5c78426ed271935d91787f6ef60588d6b8 (commit)
      from  9dc5605ae1ced0ee924c4572e723fa8e9a3ff803 (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 3c667d5c78426ed271935d91787f6ef60588d6b8
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Mar 26 10:44:11 2018 -0300

    13200: format gitinfo on all the services
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
new file mode 100644
index 0000000..db46417
--- /dev/null
+++ b/sdk/cwl/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.decode('utf-8'))
+
+    def git_timestamp_tag(self):
+        gitinfo = subprocess.check_output(
+            ['git', 'log', '--first-parent', '--max-count=1',
+             '--format=format:%ct', '.']).strip()
+        return str(time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo))))
diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py
index 40f6e6c..8ccb664 100644
--- a/sdk/cwl/gittaggers.py
+++ b/sdk/cwl/gittaggers.py
@@ -31,7 +31,7 @@ class EggInfoFromGit(egg_info):
     def git_latest_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo)
+        return str(gitinfo.decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 752633a..eb12ab2 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -16,10 +16,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 = "1.0"
     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
 
diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py
index 4e848ed..ccf25c4 100644
--- a/sdk/python/gittaggers.py
+++ b/sdk/python/gittaggers.py
@@ -15,7 +15,7 @@ class EggInfoFromGit(egg_info):
     def git_latest_tag(self):
         gitinfo = subprocess.check_output(
             ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo)
+        return str(gitinfo.decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list