Let bundled_gems specify commits to test (#3641)
This commit is contained in:
parent
8d1b188864
commit
02e17d473a
Notes:
git
2020-10-09 18:41:46 +09:00
Merged-By: soutaro <matsumoto@soutaro.com>
@ -1,7 +1,8 @@
|
|||||||
|
# gem-name version-to-bundle repository-url [optional-commit-hash-to-test-or-defaults-to-v-version]
|
||||||
minitest 5.14.2 https://github.com/seattlerb/minitest
|
minitest 5.14.2 https://github.com/seattlerb/minitest
|
||||||
power_assert 1.2.0 https://github.com/ruby/power_assert
|
power_assert 1.2.0 https://github.com/ruby/power_assert
|
||||||
rake 13.0.1 https://github.com/ruby/rake
|
rake 13.0.1 https://github.com/ruby/rake
|
||||||
test-unit 3.3.6 https://github.com/test-unit/test-unit
|
test-unit 3.3.6 https://github.com/test-unit/test-unit 3.3.6
|
||||||
rexml 3.2.4 https://github.com/ruby/rexml
|
rexml 3.2.4 https://github.com/ruby/rexml
|
||||||
rss 0.2.9 https://github.com/ruby/rss
|
rss 0.2.9 https://github.com/ruby/rss 0.2.9
|
||||||
rbs 0.12.2 https://github.com/ruby/rbs
|
rbs 0.12.2 https://github.com/ruby/rbs
|
||||||
|
@ -8,18 +8,20 @@ BEGIN {
|
|||||||
Dir.chdir(dir)
|
Dir.chdir(dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
n, v, u = $F
|
n, v, u, r = $F
|
||||||
|
|
||||||
|
next if n =~ /^#/
|
||||||
|
|
||||||
if File.directory?(n)
|
if File.directory?(n)
|
||||||
puts "updating #{n} ..."
|
puts "updating #{n} ..."
|
||||||
system("git", (v == "master" ? "pull" : "fetch"), chdir: n) or abort
|
system("git", "fetch", chdir: n) or abort
|
||||||
else
|
else
|
||||||
puts "retrieving #{n} ..."
|
puts "retrieving #{n} ..."
|
||||||
system(*%W"git clone #{u} #{n}") or abort
|
system(*%W"git clone #{u} #{n}") or abort
|
||||||
end
|
end
|
||||||
|
c = r || "v#{v}"
|
||||||
checkout = %w"git -c advice.detachedHead=false checkout"
|
checkout = %w"git -c advice.detachedHead=false checkout"
|
||||||
unless system(*checkout, v.sub(/\A(?=\d)/, 'v'), chdir: n)
|
puts "checking out #{c} (v=#{v}, r=#{r}) ..."
|
||||||
unless /\A\d/ =~ v and system(*checkout, v, chdir: n)
|
unless system(*checkout, c, "--", chdir: n)
|
||||||
abort
|
abort
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user