brew-pull/test-bot: use stricter formula match.
This commit is contained in:
parent
e4b6fc5ae0
commit
72d1310636
@ -78,7 +78,7 @@ ARGV.named.each do|arg|
|
|||||||
`git diff #{revision}.. --name-status`.each_line do |line|
|
`git diff #{revision}.. --name-status`.each_line do |line|
|
||||||
status, filename = line.split
|
status, filename = line.split
|
||||||
# Don't try and do anything to removed files.
|
# 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')
|
formula = File.basename(filename, '.rb')
|
||||||
ohai "Installing #{formula}"
|
ohai "Installing #{formula}"
|
||||||
install = Formula.factory(formula).installed? ? 'upgrade' : 'install'
|
install = Formula.factory(formula).installed? ? 'upgrade' : 'install'
|
||||||
|
|||||||
@ -230,7 +230,7 @@ class Test
|
|||||||
status, filename = line.split
|
status, filename = line.split
|
||||||
# Don't try and do anything to removed files.
|
# Don't try and do anything to removed files.
|
||||||
if (status == 'A' or status == 'M')
|
if (status == 'A' or status == 'M')
|
||||||
if filename.include? '/Formula/'
|
if filename.match /Formula\/\w+\.rb$/
|
||||||
@formulae << File.basename(filename, '.rb')
|
@formulae << File.basename(filename, '.rb')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user