Update CI

This commit is contained in:
Mykola Grymalyuk
2021-06-23 12:34:05 -06:00
parent 1064be45df
commit 8cfa90f352
2 changed files with 12 additions and 1 deletions

View File

@@ -19,9 +19,10 @@ jobs:
- run: cd dist; cp OCLP-CLI ../ - run: cd dist; cp OCLP-CLI ../
- name: Download latest nightly OCLP-GUI - 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: 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 - name: Merge new GUI
run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/ run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/
- run: python3 merge_gui.py
- name: Zip new GUI - name: Zip new GUI
run: zip -r OpenCore\ Patcher.app.zip OpenCore-Patcher-GUI.app run: zip -r OpenCore\ Patcher.app.zip OpenCore-Patcher-GUI.app
- name: Upload Binary to Artifacts - name: Upload Binary to Artifacts

10
merge_gui.py Normal file
View File

@@ -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)