brew-test-bot: always write something to email file.
This commit is contained in:
parent
a89c501486
commit
3fe7346760
@ -14,6 +14,7 @@ require 'utils'
|
|||||||
require 'date'
|
require 'date'
|
||||||
require 'erb'
|
require 'erb'
|
||||||
|
|
||||||
|
EMAIL_SUBJECT_FILE = "brew-test-bot.email.txt"
|
||||||
HOMEBREW_CONTRIBUTED_CMDS = HOMEBREW_REPOSITORY + "Library/Contributions/cmd/"
|
HOMEBREW_CONTRIBUTED_CMDS = HOMEBREW_REPOSITORY + "Library/Contributions/cmd/"
|
||||||
|
|
||||||
class Step
|
class Step
|
||||||
@ -353,6 +354,12 @@ if Pathname.pwd == HOMEBREW_PREFIX and ARGV.include? "--cleanup"
|
|||||||
odie 'cannot use --cleanup from HOMEBREW_PREFIX as it will delete all output.'
|
odie 'cannot use --cleanup from HOMEBREW_PREFIX as it will delete all output.'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ARGV.include? "--email"
|
||||||
|
File.open EMAIL_SUBJECT_FILE, 'w' do |file|
|
||||||
|
file.write "FAILED"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
tests = []
|
tests = []
|
||||||
any_errors = false
|
any_errors = false
|
||||||
if ARGV.named.empty?
|
if ARGV.named.empty?
|
||||||
@ -392,7 +399,7 @@ if ARGV.include? "--email"
|
|||||||
email_subject = "#{failed_steps.join ', '}"
|
email_subject = "#{failed_steps.join ', '}"
|
||||||
end
|
end
|
||||||
|
|
||||||
File.open "brew-test-bot.email.txt", 'w' do |file|
|
File.open EMAIL_SUBJECT_FILE, 'w' do |file|
|
||||||
file.write email_subject
|
file.write email_subject
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user