Files
deskflow/scripts/github_env.py
Nick Bolton bec38ab47b Re-implement packaging for GitHub workflows (Windows) (#7360)
* Add new version env vars to example

* Remove test file

* Move CMake packaging to separate module and configure OpenSSL path for Windows

* Make VS Code CMake build task default

* Generate Microsoft-friendly 4-digit version number

* Update macOS bundle .plist with build year variable

* Use correct OpenSSL path and fixed various MSI variables

* Use correct rest/dist dir for MSI

* Add version .rc file for Windows

* Use macro instead of over-complicated version query command

* Made cmd_utils more secure by defaulting to no-shell and no-print

* Add certificate management module

* Implement packaging script on Windows

* Refactor Mac packaging script to use new cmd_utils args and new cert module

* Update ChangeLog

* Change PFX env vars and add to CI

* Use import as instead of from lib to solve resolve issue

* Allow custom certificate extensions

* Check for package version when using gdrive

* Make version number required

* Add missing shell

* Add missing gdrive value in test

* Find OpenSSL dir based on openssl binary

* Only use first OpenSSL entry

* More verbose logging

* Improve logging

* Only use env var if not empty

* Fixed wrong var

* Fixed macOS GitHub artefact name

* Change filename format to match new convention
2024-06-28 09:35:18 +00:00

33 lines
750 B
Python
Executable File

#!/usr/bin/env python3
import argparse
import lib.env as env
import lib.github as github
from lib.config import Config
qt_version_key = "QT_VERSION"
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
"--set-qt-version",
action="store_true",
help=f"Set {qt_version_key} env var",
)
args = parser.parse_args()
# important: load venv before loading modules that install deps.
env.ensure_in_venv(__file__)
if args.set_qt_version:
config = Config()
_qt_mirror, qt_version, _qt_install_dir = config.get_qt_config()
github.set_env(qt_version_key, qt_version)
else:
raise RuntimeError("No option selected")
if __name__ == "__main__":
main()