Compare commits

...

3 Commits

Author SHA1 Message Date
Dan Albert
2891649531 Fix pyinstaller spec for release.
final and buildnumber are optional files. Move them into resources to
avoid naming them explicitly.

(cherry picked from commit fae9650f56)
2020-11-14 13:13:18 -08:00
Dan Albert
4b40739918 Fix versioning for release builds.
(cherry picked from commit 9019cbfd2b)
2020-11-14 13:13:18 -08:00
C. Perreau
e26e7f53c5 Merge pull request #367 from Khopa/develop_2_2_x
Release 2.2.0
2020-11-14 21:46:59 +01:00
4 changed files with 19 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ jobs:
- name: update build number - name: update build number
run: | run: |
[IO.File]::WriteAllLines($pwd.path + "\buildnumber", $env:GITHUB_RUN_NUMBER) [IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
- name: Build binaries - name: Build binaries
run: | run: |

View File

@@ -29,6 +29,10 @@ jobs:
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
- name: Finalize version
run: |
New-Item -ItemType file resources\final
- name: mypy game - name: mypy game
run: | run: |
./venv/scripts/activate ./venv/scripts/activate

View File

@@ -1,8 +1,18 @@
from pathlib import Path from pathlib import Path
def _build_version_string() -> str:
components = ["2.2.0"]
build_number_path = Path("resources/buildnumber")
if build_number_path.exists():
with build_number_path.open("r") as build_number_file:
components.append(build_number_file.readline())
if not Path("resources/final").exists():
components.append("preview")
return "-".join(components)
#: Current version of Liberation. #: Current version of Liberation.
VERSION = "2.2.0" VERSION = _build_version_string()
if Path("buildnumber").exists():
with open("buildnumber", "r") as file:
VERSION += f"-{file.readline()}"

View File

@@ -11,7 +11,6 @@ analysis = Analysis(
('resources', 'resources'), ('resources', 'resources'),
('resources/caucasus.p', 'dcs/terrain/'), ('resources/caucasus.p', 'dcs/terrain/'),
('resources/nevada.p', 'dcs/terrain/'), ('resources/nevada.p', 'dcs/terrain/'),
('buildnumber', './')
], ],
hookspath=[], hookspath=[],
runtime_hooks=[], runtime_hooks=[],