From b155eb4ffc195696d52c3c61fa8067454a05bc7b Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 2 Nov 2023 22:01:27 -0400 Subject: [PATCH] macos: verify dmg format and filesystem Also dump dmg imageinfo for ci logs. minimum macos versions: jdk 10.12 ULFO 10.11 UDBZ 10.4 HFS+ 8.1 APFS 10.13 And so, we try to target 10.12, via ULFO/HFS+ and UDBZ/HFS+ --- build-osx-aarch64.sh | 15 ++++++++++++++- build-osx-x64.sh | 10 +++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/build-osx-aarch64.sh b/build-osx-aarch64.sh index 2070bdf0..156a6d98 100755 --- a/build-osx-aarch64.sh +++ b/build-osx-aarch64.sh @@ -60,7 +60,20 @@ codesign -f -s "${SIGNING_IDENTITY}" --entitlements osx/signing.entitlements --o create-dmg $APPBASE . || true mv RuneLite\ *.dmg RuneLite-aarch64.dmg +# dump for CI +hdiutil imageinfo RuneLite-aarch64.dmg + +if ! hdiutil imageinfo RuneLite-aarch64.dmg | grep -q "Format: ULFO" ; then + echo Format of dmg is not ULFO + exit 1 +fi + +if ! hdiutil imageinfo RuneLite-aarch64.dmg | grep -q "Apple_HFS" ; then + echo Filesystem of dmg is not Apple_HFS + exit 1 +fi + # Notarize app if xcrun notarytool submit RuneLite-aarch64.dmg --wait --keychain-profile "AC_PASSWORD" ; then xcrun stapler staple RuneLite-aarch64.dmg -fi +fi \ No newline at end of file diff --git a/build-osx-x64.sh b/build-osx-x64.sh index b1443bd7..afe7b382 100755 --- a/build-osx-x64.sh +++ b/build-osx-x64.sh @@ -46,12 +46,20 @@ codesign -f -s "${SIGNING_IDENTITY}" --entitlements osx/signing.entitlements --o create-dmg --format UDBZ $APPBASE . || true mv RuneLite\ *.dmg RuneLite-x64.dmg +# dump for CI +hdiutil imageinfo RuneLite-x64.dmg + if ! hdiutil imageinfo RuneLite-x64.dmg | grep -q "Format: UDBZ" ; then echo "Format of resulting dmg was not UDBZ, make sure your create-dmg has support for --format" exit 1 fi +if ! hdiutil imageinfo RuneLite-x64.dmg | grep -q "Apple_HFS" ; then + echo Filesystem of dmg is not Apple_HFS + exit 1 +fi + # Notarize app if xcrun notarytool submit RuneLite-x64.dmg --wait --keychain-profile "AC_PASSWORD" ; then xcrun stapler staple RuneLite-x64.dmg -fi +fi \ No newline at end of file