13339: update gemspecs for new versioning
authorFernando Monserrat <fernando.monserrat@gmail.com>
Fri, 6 Apr 2018 20:13:46 +0000 (17:13 -0300)
committerFernando Monserrat <fernando.monserrat@gmail.com>
Fri, 6 Apr 2018 20:13:46 +0000 (17:13 -0300)
Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat@veritasgenetics.com>

sdk/cli/arvados-cli.gemspec
sdk/ruby/arvados.gemspec
services/login-sync/arvados-login-sync.gemspec

index 93968e2b94b7f9486f83ad0f9ca3b997e8294f3c..10be5e72c44fcf201f260feb256a2c3c46b2d6c5 100644 (file)
@@ -7,12 +7,13 @@ if not File.exist?('/usr/bin/git') then
   exit
 end
 
-git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
+git_latest_tag - `git describe --abbrev=0`
+git_timestamp = `git log -n1 --first-parent --format=%ct`
 git_timestamp = Time.at(git_timestamp.to_i).utc
 
 Gem::Specification.new do |s|
   s.name        = 'arvados-cli'
-  s.version     = "0.1.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+  s.version     = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
   s.date        = git_timestamp.strftime("%Y-%m-%d")
   s.summary     = "Arvados CLI tools"
   s.description = "Arvados command line tools, git commit #{git_hash}"
index c351189f81d5df59fbdf5a4dcfc6afd20a97a586..6b072ec9964ba0b5ad32eb3bd890469df122d30e 100644 (file)
@@ -7,12 +7,13 @@ if not File.exist?('/usr/bin/git') then
   exit
 end
 
-git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
+git_latest_tag - `git describe --abbrev=0`
+git_timestamp = `git log -n1 --first-parent --format=%ct`
 git_timestamp = Time.at(git_timestamp.to_i).utc
 
 Gem::Specification.new do |s|
   s.name        = 'arvados'
-  s.version     = "0.1.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+  s.version     = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
   s.date        = git_timestamp.strftime("%Y-%m-%d")
   s.summary     = "Arvados client library"
   s.description = "Arvados client library, git commit #{git_hash}"
index 28ae431669b05cd21521e3211f68af1c58e5d35d..61d5dd82f78d850c480f030d934768b3548271b8 100644 (file)
@@ -7,12 +7,13 @@ if not File.exists?('/usr/bin/git') then
   exit
 end
 
-git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H .`.chomp.split(":")
+git_latest_tag - `git describe --abbrev=0`
+git_timestamp = `git log -n1 --first-parent --format=%ct`
 git_timestamp = Time.at(git_timestamp.to_i).utc
 
 Gem::Specification.new do |s|
   s.name        = 'arvados-login-sync'
-  s.version     = "0.1.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
+  s.version     = "#{git_latest_tag}.#{git_timestamp.strftime('%Y%m%d%H%M%S')}"
   s.date        = git_timestamp.strftime("%Y-%m-%d")
   s.summary     = "Set up local login accounts for Arvados users"
   s.description = "Creates and updates local login accounts for Arvados users. Built from git commit #{git_hash}"