summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-08-23 13:35:17 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-08-23 13:35:41 -0700
commiteb795b0325c96c88e05f765d7ea015b220471a93 (patch)
treeb5904bb7952dba93920fde6e2da4cfaac5c2e94b /tool/sync_default_gems.rb
parentf33c412ebcaac622a3b5b5ff38ec46bd13187578 (diff)
Avoid sync rule duplication between YARP and others
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-xtool/sync_default_gems.rb22
1 files changed, 5 insertions, 17 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 47ffe9dee1..4667f4919f 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -437,21 +437,11 @@ module SyncDefaultGems
)\z/mx
YARP_IGNORE_FILE_PATTERN =
- /\A(?:[A-Z]\w*\.(?:md|txt)
- |[^\/]+\.yml
- |\.git.*
- |[A-Z]\w+file
- |COPYING
- |CONTRIBUTING\.md
- |Gemfile
- |Gemfile\.lock
- |Makefile\.in
- |README\.md
+ /\A(?:Makefile\.in
+ |Gemfile.lock
|bin\/.*
|configure\.ac
- |rakelib\/.*
|rust\/.*
- |test\/lib\/.*
|tasks\/.*
|ext\/yarp\/extconf\.rb
)\z/mx
@@ -526,11 +516,9 @@ module SyncDefaultGems
end
# Ignore Merge commits and already-merged commits.
- case gem
- when "yarp"
- ignore_file_pattern = YARP_IGNORE_FILE_PATTERN
- else
- ignore_file_pattern = IGNORE_FILE_PATTERN
+ ignore_file_pattern = IGNORE_FILE_PATTERN
+ if gem == "yarp"
+ ignore_file_pattern = Regexp.union(ignore_file_pattern, YARP_IGNORE_FILE_PATTERN)
end
commits.delete_if do |sha, subject|
files = pipe_readlines(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}")