def check_remote_git_version(): #use remote_file_list.out - this is the full dir/ls command with #permissions, user, group, etc. no flags are allowed, so we have to parse #check if version of remotely uploaded files is the most recent git_rev = git_version() with open(os.path.join(curdir, "remote_file_list.out")) as fin: for line in fin: if re.search(git_rev[:7], line): # found a match, don't do anything sys.exit(0) else: sys.exit(1)
email_name, ('josef.pktd' + 'AT' + 'gmail' + '.com').replace('AT', '@') ] #to_email = [email_name] def email_me(git_rev): message = """ Windows binaries uploaded successfully for git revision %s. https://github.com/statsmodels/statsmodels/commit/%s http://statsmodels.sourceforge.net/binaries/ """ % (git_rev[:7], git_rev) subject = "Windows Binaries Uploaded" msg = MIMEText(message) msg['Subject'] = subject msg['From'] = email_name msg['To'] = email_name server = smtplib.SMTP('smtp.gmail.com', 587) server.ehlo() server.starttls() server.ehlo() server.login(email_name, gmail_pwd) server.sendmail(email_name, to_email, msg.as_string()) server.close() if __name__ == "__main__": git_rev = git_version() email_me(git_rev)
email_name = email_name.replace('AT','@') to_email = [email_name, ('josef.pktd' + 'AT' + 'gmail' + '.com').replace('AT', '@')] #to_email = [email_name] def email_me(git_rev): message = """ Windows binaries uploaded successfully for git revision %s. https://github.com/statsmodels/statsmodels/commit/%s http://statsmodels.sourceforge.net/binaries/ """ % (git_rev[:7], git_rev) subject = "Windows Binaries Uploaded" msg = MIMEText(message) msg['Subject'] = subject msg['From'] = email_name msg['To'] = email_name server = smtplib.SMTP('smtp.gmail.com',587) server.ehlo() server.starttls() server.ehlo() server.login(email_name, gmail_pwd) server.sendmail(email_name, to_email, msg.as_string()) server.close() if __name__ == "__main__": git_rev = git_version() email_me(git_rev)