mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Drop optional commit hash when updated
This commit is contained in:
parent
04b5e85bfd
commit
c25cf1eaaa
1 changed files with 7 additions and 1 deletions
8
tool/update-bundled_gems.rb
Normal file → Executable file
8
tool/update-bundled_gems.rb
Normal file → Executable file
|
@ -9,6 +9,12 @@ unless /^[^#]/ !~ (gem = $F[0])
|
|||
gem = src.fetch_spec(gem)
|
||||
uri = gem.metadata["source_code_uri"] || gem.homepage
|
||||
uri = uri.sub(%r[\Ahttps://github\.com/[^/]+/[^/]+\K/tree/.*], "").chomp(".git")
|
||||
$F[3][$F[1]] = gem.version.to_s if $F[3] && $F[3].include?($F[1])
|
||||
if $F[3]
|
||||
if $F[3].include?($F[1])
|
||||
$F[3][$F[1]] = gem.version.to_s
|
||||
elsif $F[2] != gem.version and /\A\h+\z/ =~ $F[3]
|
||||
$F[3..-1] = []
|
||||
end
|
||||
end
|
||||
$_ = [gem.name, gem.version, uri, *$F[3..-1]].join(" ")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue