Skip to content

Commit

Permalink
Add a build:local_ruby task to simplify local testing flow
Browse files Browse the repository at this point in the history
A common way to test RDoc changes is to build `ruby/ruby`'s documentation
with the latest RDoc changes. When RDoc was a default gem, we can
sync it to `ruby/ruby` with its `tool/sync_default_gems.rb` script.

Now that RDoc is a bundled gem, we need to use a different method to
sync it to `ruby/ruby`. And so far building it and moving it to
`ruby/ruby`'s bundled gems folder is the easiest way to do it.
  • Loading branch information
st0012 committed Jan 24, 2025
1 parent f6289b7 commit f1c470a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ task :clean do
end
end

desc "Build #{Bundler::GemHelper.gemspec.full_name} and move it to local ruby/ruby project's bundled gems folder"
namespace :build do
task local_ruby: :build do
target = File.join("..", "ruby", "gems")
unless File.directory?(target)
abort("Expected ruby to be cloned at the same level as #{Bundler::GemHelper.gemspec.full_name} to use this task")
end

mv("#{path}.gem", target)
end
end

begin
require 'rubocop/rake_task'
rescue LoadError
Expand Down

0 comments on commit f1c470a

Please sign in to comment.