Avoid sync rule duplication between YARP and others

This commit is contained in:
Takashi Kokubun 2023-08-23 13:35:17 -07:00
parent f33c412ebc
commit eb795b0325

View File

@ -437,21 +437,11 @@ module SyncDefaultGems
)\z/mx )\z/mx
YARP_IGNORE_FILE_PATTERN = YARP_IGNORE_FILE_PATTERN =
/\A(?:[A-Z]\w*\.(?:md|txt) /\A(?:Makefile\.in
|[^\/]+\.yml |Gemfile.lock
|\.git.*
|[A-Z]\w+file
|COPYING
|CONTRIBUTING\.md
|Gemfile
|Gemfile\.lock
|Makefile\.in
|README\.md
|bin\/.* |bin\/.*
|configure\.ac |configure\.ac
|rakelib\/.*
|rust\/.* |rust\/.*
|test\/lib\/.*
|tasks\/.* |tasks\/.*
|ext\/yarp\/extconf\.rb |ext\/yarp\/extconf\.rb
)\z/mx )\z/mx
@ -526,11 +516,9 @@ module SyncDefaultGems
end end
# Ignore Merge commits and already-merged commits. # Ignore Merge commits and already-merged commits.
case gem ignore_file_pattern = IGNORE_FILE_PATTERN
when "yarp" if gem == "yarp"
ignore_file_pattern = YARP_IGNORE_FILE_PATTERN ignore_file_pattern = Regexp.union(ignore_file_pattern, YARP_IGNORE_FILE_PATTERN)
else
ignore_file_pattern = IGNORE_FILE_PATTERN
end end
commits.delete_if do |sha, subject| commits.delete_if do |sha, subject|
files = pipe_readlines(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}") files = pipe_readlines(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}")