Skip to content

Add a build:local_ruby task to simplify local testing flow #1281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ruby-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ jobs:
- name: Build RDoc locally
run: |
bundle install
bundle exec rake build
mv pkg/rdoc-*.gem ../ruby/gems
bundle exec rake build:local_ruby
working-directory: ruby/rdoc
- name: Generate Documentation with RDoc
run: make html
Expand Down
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ 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 under the same parent directory as RDoc to use this task")
end

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

begin
require 'rubocop/rake_task'
rescue LoadError
Expand Down
Loading