brew-pull/test-bot: use stricter formula match.

This commit is contained in:
Mike McQuaid 2013-09-27 17:54:01 +01:00
parent e4b6fc5ae0
commit 72d1310636
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ ARGV.named.each do|arg|
`git diff #{revision}.. --name-status`.each_line do |line|
status, filename = line.split
# Don't try and do anything to removed files.
if (status == 'A' or status == 'M') and filename.include? '/Formula/' or tap url
if (status == 'A' or status == 'M') and filename.match /Formula\/\w+\.rb$/ or tap url
formula = File.basename(filename, '.rb')
ohai "Installing #{formula}"
install = Formula.factory(formula).installed? ? 'upgrade' : 'install'

View File

@ -230,7 +230,7 @@ class Test
status, filename = line.split
# Don't try and do anything to removed files.
if (status == 'A' or status == 'M')
if filename.include? '/Formula/'
if filename.match /Formula\/\w+\.rb$/
@formulae << File.basename(filename, '.rb')
end
end