Skip to content

Commit e83a29f

Browse files
author
Chang She
committed
DOC: more notifications for daily doc build
1 parent d7fd675 commit e83a29f

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

doc/make.py

+19-8
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,37 @@ def all():
9999
def auto_dev_build(debug=False):
100100
msg = ''
101101
try:
102+
step = 'clean'
102103
clean()
104+
step = 'html'
103105
html()
104-
latex()
106+
step = 'upload dev'
105107
upload_dev()
108+
if not debug():
109+
sendmail(step)
110+
111+
step = 'latex'
112+
latex()
113+
step = 'upload pdf'
106114
upload_dev_pdf()
107115
if not debug:
108-
sendmail()
116+
sendmail(step)
109117
except (Exception, SystemExit), inst:
110118
msg += str(inst) + '\n'
111-
sendmail(msg)
119+
sendmail(step, msg)
112120

113-
def sendmail(err_msg=None):
121+
def sendmail(step=None, err_msg=None):
114122
from_name, to_name = _get_config()
115123

116-
if err_msg is None:
117-
msgstr = 'Daily docs build completed successfully'
118-
subject = "DOC: daily build successful"
124+
if step is None:
125+
step = ''
126+
127+
if err_msg is None or '[ERROR]' not in err_msg:
128+
msgstr = 'Daily docs %s completed successfully' % step
129+
subject = "DOC: %s successful" % step
119130
else:
120131
msgstr = err_msg
121-
subject = "DOC: daily build failed"
132+
subject = "DOC: %s failed" % step
122133

123134
import smtplib
124135
from email.MIMEText import MIMEText

0 commit comments

Comments
 (0)