brew-test-bot: use path-limited diff
This commit is contained in:
parent
4e29bab683
commit
a57e49db39
@ -247,14 +247,14 @@ class Test
|
|||||||
return unless diff_start_sha1 != diff_end_sha1
|
return unless diff_start_sha1 != diff_end_sha1
|
||||||
return if @url and not steps.last.passed?
|
return if @url and not steps.last.passed?
|
||||||
|
|
||||||
diff_stat = git "diff", "#{diff_start_sha1}..#{diff_end_sha1}", "--name-status"
|
diff_stat = git "diff-tree", "-r", "--name-status",
|
||||||
|
diff_start_sha1, diff_end_sha1, "--", "Library/Formula"
|
||||||
|
|
||||||
diff_stat.each_line do |line|
|
diff_stat.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')
|
if status == "A" || status == "M"
|
||||||
if filename.match /Formula\/.+\.rb$/
|
@formulae << File.basename(filename, ".rb")
|
||||||
@formulae << File.basename(filename, '.rb')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user