0001 from misc import version, minorMinorVersion, minorMinorDate 0002 import time, re 0003 0004 print """Old version %s 0005 Build version %s 0006 Date %s 0007 0008 """ % (version, minorMinorVersion, minorMinorDate) 0009 0010 release = "%s.%s" % (version, minorMinorVersion) 0011 #update updates, but don't save yet! 0012 0013 currentUpdates = file("currentUpdates.html" ,"r").read() 0014 currentUpdates = re.sub(r"\:\:VERSION\:\:", release, currentUpdates) 0015 currentUpdates = re.sub(r"\:\:DATE\:\:", minorMinorDate, currentUpdates) 0016 0017 updates = file("updates.html", "r").read() 0018 updates = re.sub(r"\:\:UPDATE\:\:", "::UPDATE::\n" + currentUpdates, updates) 0019 0020 0021 version = raw_input("New Version? ") 0022 minorMinorVersion = -1 0023 versionDate = time.strftime("%d %b %Y %H:%M:%S +0000", time.gmtime()) 0024 release = "%s.%s" % (version, minorMinorVersion) 0025 0026 # update files 0027 0028 f = file("releases.py", "a") 0029 f.write("# PyXR.zip Release %s\n" % release) 0030 f.write("# REVISION BUMP\n\n") 0031 f.write("version = %s\n" % repr(version)) 0032 f.write("minorMinorVersion = %s\n" % (minorMinorVersion)) 0033 f.write ("minorMinorDate = %s\n\n" % repr(versionDate)) 0034 f.close() 0035 0036 f = file("updates.html","w") 0037 f.write(updates) 0038 f.close() 0039 0040 currentUpdates = """<h2>New Features for Release ::VERSION:: (::DATE::)</h2> 0041 <ul> 0042 <li></li> 0043 </ul>""" 0044 0045 f = file("currentUpdates.html", "w") 0046 f.write(currentUpdates) 0047 f.close() 0048 0049 0050 f.close() 0051 0052 0053
Generated by PyXR 0.9.4