X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/060d38d627bd1e51dd2b3c6e7de9af6aa7d7b6f3..a788135c352c36d1a905c7630423ba57b2ae072a:/sdk/cli/arvados-cli.gemspec diff --git a/sdk/cli/arvados-cli.gemspec b/sdk/cli/arvados-cli.gemspec index 93968e2b94..fd48b4852d 100644 --- a/sdk/cli/arvados-cli.gemspec +++ b/sdk/cli/arvados-cli.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-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}"