summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-08-21 13:17:59 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-08-21 13:17:59 -0700
commit2502821abb0f2baf10a61c685a644a50a35c2cd9 (patch)
tree15c74d1fd792b163c5e5996c56a46ce3311e99c9 /tool/sync_default_gems.rb
parentb9ef819116e90ad9c3af99046d001845b047427f (diff)
Exclude docs/ from YARP sync
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-xtool/sync_default_gems.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index e4e259e6f6..9b9b0011ba 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -577,11 +577,16 @@ module SyncDefaultGems
when "rubygems"
# We don't copy any vcr_cassettes to this repository. Because the directory does not
# exist, rename detection doesn't work. So it starts with the original path `bundler/`.
- %w[bundler/spec/support/artifice/vcr_cassettes].each do |rem|
- if File.exist?(rem)
- system("git", "reset", rem)
- rm_rf(rem)
- end
+ ignored_paths = %w[bundler/spec/support/artifice/vcr_cassettes]
+ when "yarp"
+ # Rename detection never works between ruby/ruby/doc and ruby/yarp/docs
+ # since ruby/ruby/doc is not something owned by YARP.
+ ignored_paths = %w[docs/]
+ end
+ ignored_paths.each do |path|
+ if File.exist?(path)
+ system("git", "reset", path)
+ rm_rf(path)
end
end