diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cab28472..71d5cf3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,10 @@ jobs: run: | ./venv/scripts/activate mypy theater + + - name: update build number + run: | + [IO.File]::WriteAllLines($pwd.path + "\buildnumber", $env:GITHUB_RUN_NUMBER) - name: Build binaries run: | diff --git a/pyinstaller.spec b/pyinstaller.spec index 839c641f..e545d073 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -11,6 +11,7 @@ analysis = Analysis( ('resources', 'resources'), ('resources/caucasus.p', 'dcs/terrain/'), ('resources/nevada.p', 'dcs/terrain/'), + ('buildnumber', './') ], hookspath=[], runtime_hooks=[], diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index fcf8ef32..734006e8 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -1,5 +1,6 @@ import os from typing import Dict +from pathlib import Path from PySide2.QtGui import QColor, QFont, QPixmap @@ -7,6 +8,9 @@ from theater.theatergroundobject import CATEGORY_MAP from .liberation_theme import get_theme_icons VERSION_STRING = "2.2.0-preview" +if Path("buildnumber").exists(): + with open("buildnumber", "r") as file: + VERSION_STRING += f"-{file.readline()}" URLS : Dict[str, str] = { "Manual": "https://github.com/khopa/dcs_liberation/wiki",