X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/df591042778408d03d410d5c22a669d85652d1ea..a8d73de4f59cf567a96f2f04be01a249d4f7c20b:/sdk/ruby/arvados.gemspec diff --git a/sdk/ruby/arvados.gemspec b/sdk/ruby/arvados.gemspec index c351189f81..e39c426317 100644 --- a/sdk/ruby/arvados.gemspec +++ b/sdk/ruby/arvados.gemspec @@ -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}"