From 183579b83c0be3e2b4f3f12a57618e5d3f7b99fe Mon Sep 17 00:00:00 2001 From: Vittorio Parrella Date: Sun, 3 Nov 2024 22:46:36 +0100 Subject: [PATCH] fix: macos package version fix --- .github/workflows/release.yml | 2 +- .../{QPep.app/Contents/Info.plist => Info.plist.tpl} | 2 +- installer_osx.sh | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) rename installer-osx/{QPep.app/Contents/Info.plist => Info.plist.tpl} (97%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3444259..de3c13b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,7 +150,7 @@ jobs: - name: Build MacOS installer run: | - bash ./installer_osx.sh + bash ./installer_osx.sh "${{ github.event.inputs.version_tag }}" - uses: actions/upload-artifact@v4 with: diff --git a/installer-osx/QPep.app/Contents/Info.plist b/installer-osx/Info.plist.tpl similarity index 97% rename from installer-osx/QPep.app/Contents/Info.plist rename to installer-osx/Info.plist.tpl index 6bace9f..e50c3c5 100644 --- a/installer-osx/QPep.app/Contents/Info.plist +++ b/installer-osx/Info.plist.tpl @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.0 + ${QPEP_VERSION} CFBundleSignature ???? CFBundleVersion diff --git a/installer_osx.sh b/installer_osx.sh index 1516a1e..e2b9d40 100644 --- a/installer_osx.sh +++ b/installer_osx.sh @@ -9,11 +9,17 @@ function fail() { exit 1 } +export QPEP_VERSION=$1 echo "************************************" echo "**** QPEP OSX INSTALLER BUILDER ****" +echo "**** VERSION: ${QPEP_VERSION}" echo "************************************" echo +if [[ "${QPEP_VERSION}" -eq "" ]]; then + fail "Version not specified" +fi + echo [Prerequisites check: PLATFORM MAC] uname -a | grep Darwin if [[ ! "$?" -eq "0" ]]; then @@ -76,6 +82,8 @@ export QPEP_SLOWSTART=search envsubst < ./qpep.yml.tpl > QPep.app/Contents/MacOS/config/qpep.yml cp ./server_cert.pem QPep.app/Contents/MacOS/server_cert.pem +envsubst < ./Info.plist.tpl > QPep.app/Contents/Info.plist + echo [Generate Install Bundle] pkgbuild --root "QPep.app" --identifier com.project-faster.qpep --scripts Scripts --install-location "/Applications/QPep.app" DistributionInstall.pkg