diff --git a/.github/workflows/build-gui.yml b/.github/workflows/build-gui.yml index 604b9f2db..3c499de7e 100644 --- a/.github/workflows/build-gui.yml +++ b/.github/workflows/build-gui.yml @@ -19,9 +19,10 @@ jobs: - run: cd dist; cp OCLP-CLI ../ - name: Download latest nightly OCLP-GUI run: curl -S -L https://nightly.link/dortania/OCLP-GUI/workflows/build-app/master/OpenCore-Patcher-GUI.app.zip --output ./OpenCore-Patcher-GUI.app.zip - - run: unzip OpenCore-Patcher-GUI.app.zip + - run: unzip -o OpenCore-Patcher-GUI.app.zip - name: Merge new GUI run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/ + - run: python3 merge_gui.py - name: Zip new GUI run: zip -r OpenCore\ Patcher.app.zip OpenCore-Patcher-GUI.app - name: Upload Binary to Artifacts diff --git a/merge_gui.py b/merge_gui.py new file mode 100644 index 000000000..d26acc93e --- /dev/null +++ b/merge_gui.py @@ -0,0 +1,10 @@ +# Updates build version in OCLP-GUI during CI builds +# Copyright (C) 2021 Mykola Grymalyuk +import plistlib +from pathlib import Path +from Resources import Constants + +app_path = Path.cwd() / Path ("OpenCore Patcher.app/Contents/Info.plist") +info = plistlib.load(Path(app_path).open("rb")) +info["CFBundleShortVersionString"] = Constants.Constants().patcher_version +plistlib.dump(info, Path(app_path).open("wb"), sort_keys=True) \ No newline at end of file