mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Properly synchronize bundler gemspec too
By making the necessary modifications automatically.
This commit is contained in:
parent
cc4d8d037c
commit
7dccc4ef8a
Notes:
git
2021-05-11 11:30:05 +09:00
1 changed files with 8 additions and 2 deletions
|
@ -98,12 +98,18 @@ def sync_default_gems(gem)
|
|||
rm_rf(%w[lib/bundler lib/bundler.rb libexec/bundler libexec/bundle spec/bundler tool/bundler/*])
|
||||
cp_r(Dir.glob("#{upstream}/bundler/lib/bundler*"), "lib")
|
||||
cp_r(Dir.glob("#{upstream}/bundler/exe/bundle*"), "libexec")
|
||||
cp_r("#{upstream}/bundler/bundler.gemspec", "lib/bundler")
|
||||
|
||||
gemspec_content = File.readlines("#{upstream}/bundler/bundler.gemspec").map do |line|
|
||||
next if line =~ /extra_rdoc_files/
|
||||
|
||||
line.gsub("bundler.gemspec", "lib/bundler/bundler.gemspec").gsub('"exe"', '"libexec"')
|
||||
end.compact.join
|
||||
File.write("lib/bundler/bundler.gemspec", gemspec_content)
|
||||
|
||||
cp_r("#{upstream}/bundler/spec", "spec/bundler")
|
||||
cp_r(Dir.glob("#{upstream}/bundler/tool/bundler/test_gems*"), "tool/bundler")
|
||||
cp_r(Dir.glob("#{upstream}/bundler/tool/bundler/rubocop_gems*"), "tool/bundler")
|
||||
cp_r(Dir.glob("#{upstream}/bundler/tool/bundler/standard_gems*"), "tool/bundler")
|
||||
`git checkout lib/bundler/bundler.gemspec`
|
||||
rm_rf(%w[spec/bundler/support/artifice/vcr_cassettes])
|
||||
when "rdoc"
|
||||
rm_rf(%w[lib/rdoc lib/rdoc.rb test/rdoc libexec/rdoc libexec/ri])
|
||||
|
|
Loading…
Add table
Reference in a new issue