Skip to content

Commit

Permalink
Added ignore files to sync_default_gems_with_commits and make constan…
Browse files Browse the repository at this point in the history
…t them.
  • Loading branch information
hsbt committed Jul 27, 2019
1 parent 149e414 commit 012d39c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tool/sync_default_gems.rb
Expand Up @@ -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."

Expand All @@ -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:"
Expand Down

0 comments on commit 012d39c

Please sign in to comment.