diff --git a/.github/workflows/ruby-core.yml b/.github/workflows/ruby-core.yml index 07917c4423..392480b200 100644 --- a/.github/workflows/ruby-core.yml +++ b/.github/workflows/ruby-core.yml @@ -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 diff --git a/Rakefile b/Rakefile index 7680c2867f..1fbf59fe8e 100644 --- a/Rakefile +++ b/Rakefile @@ -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