refs #16010
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
-version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.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
+git_dir = ENV["GIT_DIR"]
+git_work = ENV["GIT_WORK_TREE"]
+begin
+ ENV["GIT_DIR"] = File.expand_path "#{__dir__}/../../.git"
+ ENV["GIT_WORK_TREE"] = File.expand_path "#{__dir__}/../.."
+ git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H #{__dir__}`.chomp.split(":")
+ version = `#{__dir__}/../../build/version-at-commit.sh #{git_hash}`.encode('utf-8').strip
+ git_timestamp = Time.at(git_timestamp.to_i).utc
+ensure
+ ENV["GIT_DIR"] = git_dir
+ ENV["GIT_WORK_TREE"] = git_work
+end
Gem::Specification.new do |s|
s.name = 'arvados-cli'
Gem::Specification.new do |s|
s.name = 'arvados-cli'
-version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.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
+git_dir = ENV["GIT_DIR"]
+git_work = ENV["GIT_WORK_TREE"]
+begin
+ ENV["GIT_DIR"] = File.expand_path "#{__dir__}/../../.git"
+ ENV["GIT_WORK_TREE"] = File.expand_path "#{__dir__}/../.."
+ git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H #{__dir__}`.chomp.split(":")
+ version = `#{__dir__}/../../build/version-at-commit.sh #{git_hash}`.encode('utf-8').strip
+ git_timestamp = Time.at(git_timestamp.to_i).utc
+ensure
+ ENV["GIT_DIR"] = git_dir
+ ENV["GIT_WORK_TREE"] = git_work
+end
Gem::Specification.new do |s|
s.name = 'arvados'
Gem::Specification.new do |s|
s.name = 'arvados'
- arvados-login-sync (1.3.1.pre20191210204053)
+ arvados-login-sync (1.5.0.pre20191230153247)
arvados (~> 1.3.0, >= 1.3.0)
faraday (< 0.16)
arvados (~> 1.3.0, >= 1.3.0)
faraday (< 0.16)
GEM
remote: https://rubygems.org/
GEM
remote: https://rubygems.org/
-version = `#{__dir__}/../../build/version-at-commit.sh HEAD`.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
+git_dir = ENV["GIT_DIR"]
+git_work = ENV["GIT_WORK_TREE"]
+begin
+ ENV["GIT_DIR"] = File.expand_path "#{__dir__}/../../.git"
+ ENV["GIT_WORK_TREE"] = File.expand_path "#{__dir__}/../.."
+ git_timestamp, git_hash = `git log -n1 --first-parent --format=%ct:%H #{__dir__}`.chomp.split(":")
+ version = `#{__dir__}/../../build/version-at-commit.sh #{git_hash}`.encode('utf-8').strip
+ git_timestamp = Time.at(git_timestamp.to_i).utc
+ensure
+ ENV["GIT_DIR"] = git_dir
+ ENV["GIT_WORK_TREE"] = git_work
+end
Gem::Specification.new do |s|
s.name = 'arvados-login-sync'
Gem::Specification.new do |s|
s.name = 'arvados-login-sync'
s.description = "Creates and updates local login accounts for Arvados users. Built from git commit #{git_hash}"
s.authors = ["Arvados Authors"]
s.email = 'gem-dev@curoverse.com'
s.description = "Creates and updates local login accounts for Arvados users. Built from git commit #{git_hash}"
s.authors = ["Arvados Authors"]
s.email = 'gem-dev@curoverse.com'
- s.licenses = ['GNU Affero General Public License, version 3.0']
+ s.licenses = ['AGPL-3.0']
s.files = ["bin/arvados-login-sync", "agpl-3.0.txt"]
s.executables << "arvados-login-sync"
s.required_ruby_version = '>= 2.1.0'
s.files = ["bin/arvados-login-sync", "agpl-3.0.txt"]
s.executables << "arvados-login-sync"
s.required_ruby_version = '>= 2.1.0'