Skip to content

Commit 0dabceb

Browse files
committed
Fetch necessary revision of bundled gems
1 parent 75d63f3 commit 0dabceb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tool/fetch-bundled_gems.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
system(*%W"git clone #{u} #{n}") or abort
3333
end
3434

35-
if r
36-
puts "fetching #{color.notice(r)} ..."
37-
system("git", "fetch", "origin", r, chdir: n) or abort
35+
c = [r, v, "v#{v}"].find do |c|
36+
next unless c
37+
puts "fetching #{color.notice(c)} ..."
38+
system("git", "fetch", "origin", c, chdir: n)
3839
end
3940

40-
c = r || "v#{v}"
4141
checkout = %w"git -c advice.detachedHead=false checkout"
4242
print %[checking out #{color.notice(c)} (v=#{color.info(v)}]
4343
print %[, r=#{color.info(r)}] if r

0 commit comments

Comments
 (0)