1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added ignore files to sync_default_gems_with_commits and make constant them.

This commit is contained in:
Hiroshi SHIBATA 2019-07-27 10:23:47 +08:00
parent 149e414ed5
commit 012d39c4e6
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -228,6 +228,8 @@ def sync_default_gems(gem)
end end
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) def sync_default_gems_with_commits(gem, range)
puts "Sync #{$repositories[gem.to_sym]} with commit history." 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| IO.popen(%W"git diff-tree --no-commit-id --name-only -r #{sha}") do |f|
files = f.read.split("\n") files = f.read.split("\n")
end 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 end
puts "Try to pick these commits:" puts "Try to pick these commits:"