mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Copy only generated parser files when RDoc syncs
This commit is contained in:
parent
18a3bf5a0e
commit
b346935cbc
1 changed files with 15 additions and 1 deletions
|
@ -109,7 +109,21 @@ def sync_default_gems(gem)
|
||||||
cp_r("#{upstream}/rdoc.gemspec", "lib/rdoc")
|
cp_r("#{upstream}/rdoc.gemspec", "lib/rdoc")
|
||||||
cp_r("#{upstream}/exe/rdoc", "libexec")
|
cp_r("#{upstream}/exe/rdoc", "libexec")
|
||||||
cp_r("#{upstream}/exe/ri", "libexec")
|
cp_r("#{upstream}/exe/ri", "libexec")
|
||||||
rm_rf(%w[lib/rdoc/markdown.kpeg lib/rdoc/markdown/literals.kpeg lib/rdoc/rd/block_parser.ry lib/rdoc/rd/inline_parser.ry])
|
parser_files = {
|
||||||
|
'lib/rdoc/markdown.kpeg' => 'lib/rdoc/markdown.rb',
|
||||||
|
'lib/rdoc/markdown/literals.kpeg' => 'lib/rdoc/markdown/literals.rb',
|
||||||
|
'lib/rdoc/rd/block_parser.ry' => 'lib/rdoc/rd/block_parser.rb',
|
||||||
|
'lib/rdoc/rd/inline_parser.ry' => 'lib/rdoc/rd/inline_parser.rb'
|
||||||
|
}
|
||||||
|
Dir.chdir(upstream) do
|
||||||
|
parser_files.each_value do |dst|
|
||||||
|
`bundle exec rake #{dst}`
|
||||||
|
end
|
||||||
|
end
|
||||||
|
parser_files.each_pair do |src, dst|
|
||||||
|
rm_rf(src)
|
||||||
|
cp_r("#{upstream}/#{dst}", dst)
|
||||||
|
end
|
||||||
`git checkout lib/rdoc/.document`
|
`git checkout lib/rdoc/.document`
|
||||||
when "reline"
|
when "reline"
|
||||||
rm_rf(%w[lib/reline lib/reline.rb test/reline])
|
rm_rf(%w[lib/reline lib/reline.rb test/reline])
|
||||||
|
|
Loading…
Reference in a new issue