diff options
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | development.md | 2 | ||||
-rw-r--r-- | ted.h | 2 | ||||
-rw-r--r-- | update-windows-installer.py | 42 | ||||
-rw-r--r-- | windows_installer/ted/ted.vdproj | 6 |
5 files changed, 48 insertions, 6 deletions
@@ -1,5 +1,5 @@ Package: ted -Version: 2.5 +Version: 2.5.1 Section: text Priority: optional Architecture: amd64 diff --git a/development.md b/development.md index 086b46a..205c843 100644 --- a/development.md +++ b/development.md @@ -120,6 +120,6 @@ When releasing a new version of `ted`: - Update `Version` in `control` for the `.deb` file. - Run `make ted.deb` on Debian/Ubuntu. - Run `make.bat release` on Windows. -- Open installer project, and increase version number. +- Run `python update-windows-installer.py`. - Build `ted.msi`. - Create a new release on GitHub with `ted.deb` and `ted.msi`. @@ -22,7 +22,7 @@ extern "C" { #include "command.h" /// Version number -#define TED_VERSION "2.5" +#define TED_VERSION "2.5.1" /// Maximum path size ted handles. #define TED_PATH_MAX 1024 /// Config filename diff --git a/update-windows-installer.py b/update-windows-installer.py new file mode 100644 index 0000000..eb272a3 --- /dev/null +++ b/update-windows-installer.py @@ -0,0 +1,42 @@ +# update windows installer ProductVersion/ProductCode/PackageCode +# this needs to be done for every release of ted + +import uuid +import re +from datetime import datetime + +timestamp = datetime.utcnow() +# will break in 2100. FUCK YOU PEOPEL OF THE FUTURE!! +version_start = '%02d.%02d.%02d' % (timestamp.year % 100, timestamp.month, timestamp.day) +product_code = str(uuid.uuid4()).upper() +package_code = str(uuid.uuid4()).upper() + +PATH = 'windows_installer/ted/ted.vdproj' + +f = open(PATH) +text = f.read() +f.close() + +text = re.sub(r'"ProductCode" = "8:\{.*\}"', '"ProductCode" = "8:{%s}"' % product_code, text) +text = re.sub(r'"PackageCode" = "8:\{.*\}"', '"PackageCode" = "8:{%s}"' % package_code, text) +curr_version = re.search('"ProductVersion" = "8:([^"]*)"', text).group(1) +curr_version_start = curr_version[:len(version_start)] +daily_id = 0 +if curr_version_start > version_start: + print('time went backwards. aborting.') + exit(1) +elif curr_version_start == version_start: + daily_id = int(curr_version[len(version_start):]) + 1 + if daily_id >= 100: + + print('''you've updated the windows installer 100 times today. +i think you should take a break. +aborting. +''') + exit(1) + +version = '%s%02d' % (version_start, daily_id) +text = re.sub(r'"ProductVersion" = "8:([^"]*)"', r'"ProductVersion" = "8:%s"' % version, text) +f = open(PATH, 'w') +f.write(text) +f.close() diff --git a/windows_installer/ted/ted.vdproj b/windows_installer/ted/ted.vdproj index a65a539..91afebf 100644 --- a/windows_installer/ted/ted.vdproj +++ b/windows_installer/ted/ted.vdproj @@ -620,15 +620,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:ted" - "ProductCode" = "8:{51C543F8-F64F-4D57-ADAF-B7FF69EA8D1D}" - "PackageCode" = "8:{2553F30D-B299-4352-8C82-61883B4BE646}" + "ProductCode" = "8:{D45DA042-74C5-4BC5-8B7B-018B58C2DDB1}" + "PackageCode" = "8:{2488749C-919C-497F-A65A-D3ED805AC5B5}" "UpgradeCode" = "8:{844F6C2B-DF3B-4A81-9BD5-603401BBA651}" "AspNetVersion" = "8:2.0.50727.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:FALSE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:23.08.1517" + "ProductVersion" = "8:23.08.2601" "Manufacturer" = "8:ted" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" |