Make sure the dev version prefix is based on the latest tag in the repo,
authorWard Vandewege <wvandewege@veritasgenetics.com>
Thu, 29 Nov 2018 19:49:31 +0000 (14:49 -0500)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Thu, 29 Nov 2018 19:49:31 +0000 (14:49 -0500)
not the latest tag on the master branch (part 2).

No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

12 files changed:
sdk/cli/arvados-cli.gemspec
sdk/cwl/arvados_version.py
sdk/cwl/gittaggers.py
sdk/pam/arvados_version.py
sdk/python/arvados_version.py
sdk/python/gittaggers.py
sdk/ruby/arvados.gemspec
services/dockercleaner/arvados_version.py
services/fuse/arvados_version.py
services/login-sync/arvados-login-sync.gemspec
services/nodemanager/arvados_version.py
tools/crunchstat-summary/arvados_version.py

index 723b5166865ab6b272dbb885b92f73c009125141..80abc9c497f2da9f0f72ebd022e47ae4fb07a14e 100644 (file)
@@ -7,7 +7,7 @@ if not File.exist?('/usr/bin/git') then
   exit
 end
 
-git_latest_tag = `git describe --abbrev=0`
+git_latest_tag = `git tag -l |sort -V -r |head -n1`
 git_latest_tag = git_latest_tag.encode('utf-8').strip
 git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
 git_timestamp = Time.at(git_timestamp.to_i).utc
index 88cf1ed7caa1da04fd5a1794c616cd5a0f2039b3..c2a4d735fd2aae6e593616c1f634029a5bcd4b59 100644 (file)
@@ -10,9 +10,9 @@ 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'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def choose_version_from():
     sdk_ts = subprocess.check_output(
index 8ccb6645de8c78ccf77d3e049fa1b1e6257e5c91..873199d7e5a6ffc4ca5ffd480ef976c5dc9f7fe5 100644 (file)
@@ -29,9 +29,9 @@ class EggInfoFromGit(egg_info):
     from source package), leave it alone.
     """
     def git_latest_tag(self):
-        gitinfo = subprocess.check_output(
-            ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo.decode('utf-8'))
+        gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+        gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+        return str(next(iter(gittags)).decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(
index ccf25c422e62085e1edf3829459f5cdb8a8710ff..213d39a24b071e089a2d05115cddafa3403f3cb8 100644 (file)
@@ -13,9 +13,9 @@ class EggInfoFromGit(egg_info):
     from source package), leave it alone.
     """
     def git_latest_tag(self):
-        gitinfo = subprocess.check_output(
-            ['git', 'describe', '--abbrev=0']).strip()
-        return str(gitinfo.decode('utf-8'))
+        gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+        gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+        return str(next(iter(gittags)).decode('utf-8'))
 
     def git_timestamp_tag(self):
         gitinfo = subprocess.check_output(
index 609af6e23dda07b2467f6cc78dfe3f69ae00bb65..da919309f4e829f227f3241eb7d41759087dde08 100644 (file)
@@ -7,7 +7,7 @@ if not File.exist?('/usr/bin/git') then
   exit
 end
 
-git_latest_tag = `git describe --abbrev=0`
+git_latest_tag = `git tag -l |sort -V -r |head -n1`
 git_latest_tag = git_latest_tag.encode('utf-8').strip
 git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
 git_timestamp = Time.at(git_timestamp.to_i).utc
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(
index f2c5735985a7131129c38469e2183ffb70ef10f6..605e8540ee1df59d3b96618ebef50f4b39567384 100644 (file)
@@ -7,7 +7,7 @@ if not File.exists?('/usr/bin/git') then
   exit
 end
 
-git_latest_tag = `git describe --abbrev=0`
+git_latest_tag = `git tag -l |sort -V -r |head -n1`
 git_latest_tag = git_latest_tag.encode('utf-8').strip
 git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
 git_timestamp = Time.at(git_timestamp.to_i).utc
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(
index a24d53dad6a629f9d08692bb19dd62e144655a7b..3be72b51f09f0da2ea9ace87531840ef84a2e35d 100644 (file)
@@ -8,9 +8,9 @@ import os
 import re
 
 def git_latest_tag():
-    gitinfo = subprocess.check_output(
-        ['git', 'describe', '--abbrev=0']).strip()
-    return str(gitinfo.decode('utf-8'))
+    gittags = subprocess.check_output(['git', 'tag', '-l']).split()
+    gittags.sort(key=lambda s: map(int, s.split('.')),reverse=True)
+    return str(next(iter(gittags)).decode('utf-8'))
 
 def git_timestamp_tag():
     gitinfo = subprocess.check_output(