File tree 1 file changed +19
-8
lines changed
1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -99,26 +99,37 @@ def all():
99
99
def auto_dev_build (debug = False ):
100
100
msg = ''
101
101
try :
102
+ step = 'clean'
102
103
clean ()
104
+ step = 'html'
103
105
html ()
104
- latex ()
106
+ step = 'upload dev'
105
107
upload_dev ()
108
+ if not debug ():
109
+ sendmail (step )
110
+
111
+ step = 'latex'
112
+ latex ()
113
+ step = 'upload pdf'
106
114
upload_dev_pdf ()
107
115
if not debug :
108
- sendmail ()
116
+ sendmail (step )
109
117
except (Exception , SystemExit ), inst :
110
118
msg += str (inst ) + '\n '
111
- sendmail (msg )
119
+ sendmail (step , msg )
112
120
113
- def sendmail (err_msg = None ):
121
+ def sendmail (step = None , err_msg = None ):
114
122
from_name , to_name = _get_config ()
115
123
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
119
130
else :
120
131
msgstr = err_msg
121
- subject = "DOC: daily build failed"
132
+ subject = "DOC: %s failed" % step
122
133
123
134
import smtplib
124
135
from email .MIMEText import MIMEText
You can’t perform that action at this time.
0 commit comments