Merge branch 'thehyve/fix-crunch-documentation' Fix a typo in Crunch Dispatch install...
[arvados.git] / sdk / ruby / arvados.gemspec
index c351189f81d5df59fbdf5a4dcfc6afd20a97a586..e39c4263177b8ed4f290c17cb744c309725c56bc 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'
-  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}"