summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-27 10:23:47 +0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-27 15:47:24 +0800
commit012d39c4e658f251f691c8a1dba462c937dbac67 (patch)
tree036a5784fbb62b49833ecd80c4409e1b03ed4f84 /tool
parent149e414ed529d27aaeb0543bc133e08c782d8d41 (diff)
Added ignore files to sync_default_gems_with_commits and make constant them.
Diffstat (limited to 'tool')
-rw-r--r--tool/sync_default_gems.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index cb9492f26e..408614f8b8 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -228,6 +228,8 @@ def sync_default_gems(gem)
end
end
+IGNORE_FILE_PATTERN = /(\.travis.yml|appveyor\.yml|azure\-pipelines\.yml|\.gitignore|Gemfile|README\.md|History\.txt|Rakefile|CODE_OF_CONDUCT\.md)/
+
def sync_default_gems_with_commits(gem, range)
puts "Sync #{$repositories[gem.to_sym]} with commit history."
@@ -250,7 +252,7 @@ def sync_default_gems_with_commits(gem, range)
IO.popen(%W"git diff-tree --no-commit-id --name-only -r #{sha}") do |f|
files = f.read.split("\n")
end
- subject =~ /^Merge/ || files.all?{|file| file =~ /(\.travis.yml|appveyor\.yml|azure\-pipelines\.yml|\.gitignore|Gemfile|README\.md)/}
+ subject =~ /^Merge/ || files.all?{|file| file =~ IGNORE_FILE_PATTERN}
end
puts "Try to pick these commits:"