Skip to content

Commit

Permalink
Fix InnoSetup Version (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl authored Feb 24, 2019
1 parent a0ff0e2 commit 22b4fc9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 1 addition & 3 deletions data/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ jobs:
displayName: "Run PyInstaller"

- script: |
choco install innosetup
python src/urh/version.py > C:\urh_version.txt
set /p URHVERSION=<C:\urh_version.txt
for /f %%i in ('python src/urh/version.py') do set URHVERSION=%%i
iscc /dMyAppVersion=%URHVERSION% /dArch=$(python.arch) data/inno.iss
condition: eq(variables['python.version'], '3.7')
displayName: "Create setup.exe"
Expand Down
2 changes: 1 addition & 1 deletion data/inno.iss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DefaultDirName={pf}\Universal Radio Hacker
DisableProgramGroupPage=yes
LicenseFile=..\LICENSE
OutputDir=..\dist
OutputBaseFilename=Universal.Radio.Hacker-{#Arch}
OutputBaseFilename=Universal.Radio.Hacker-{#MyAppVersion}-{#Arch}
Compression=lzma2/ultra
SolidCompression=yes

Expand Down
7 changes: 5 additions & 2 deletions data/release.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fileinput
import os
import shutil
import sys
Expand Down Expand Up @@ -46,8 +47,10 @@ def release():
numbers[-1] = str(int(numbers[-1]) + 1)
cur_version = ".".join(numbers)

with open(version_file, "w") as f:
f.write('VERSION = "{0}" \n'.format(cur_version))
for line in fileinput.input(version_file, inplace=True):
if line.startswith("VERSION"):
line = 'VERSION = "{0}" \n'.format(cur_version)
print(line, end='')

# Publish new version number
call(["git", "add", version_file])
Expand Down
6 changes: 5 additions & 1 deletion src/urh/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
VERSION = "2.5.6"
VERSION = "2.5.6"

if __name__ == '__main__':
# To read out version easy on command line for InnoSetup
print(VERSION)

0 comments on commit 22b4fc9

Please sign in to comment.