13497: Add controller, proxy to Rails API.
[arvados.git] / sdk / cli / arvados-cli.gemspec
index 93968e2b94b7f9486f83ad0f9ca3b997e8294f3c..fd48b4852df4f1223eb7ce6fc125fc2234e78f6d 100644 (file)
@@ -7,12 +7,14 @@ if not File.exist?('/usr/bin/git') then
   exit
 end
 
+git_latest_tag = `git describe --abbrev=0`
+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
 
 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}"