mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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>
2 changed files with 11 additions and 8 deletions
|
@ -8,18 +8,20 @@ BEGIN {
|
|||
Dir.chdir(dir)
|
||||
}
|
||||
|
||||
n, v, u = $F
|
||||
n, v, u, r = $F
|
||||
|
||||
next if n =~ /^#/
|
||||
|
||||
if File.directory?(n)
|
||||
puts "updating #{n} ..."
|
||||
system("git", (v == "master" ? "pull" : "fetch"), chdir: n) or abort
|
||||
system("git", "fetch", chdir: n) or abort
|
||||
else
|
||||
puts "retrieving #{n} ..."
|
||||
system(*%W"git clone #{u} #{n}") or abort
|
||||
end
|
||||
c = r || "v#{v}"
|
||||
checkout = %w"git -c advice.detachedHead=false checkout"
|
||||
unless system(*checkout, v.sub(/\A(?=\d)/, 'v'), chdir: n)
|
||||
unless /\A\d/ =~ v and system(*checkout, v, chdir: n)
|
||||
abort
|
||||
end
|
||||
puts "checking out #{c} (v=#{v}, r=#{r}) ..."
|
||||
unless system(*checkout, c, "--", chdir: n)
|
||||
abort
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue