Skip to content

Commit

Permalink
macos: verify dmg format and filesystem
Browse files Browse the repository at this point in the history
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+
  • Loading branch information
Adam- committed Nov 3, 2023
1 parent 848a071 commit b155eb4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
15 changes: 14 additions & 1 deletion build-osx-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 9 additions & 1 deletion build-osx-x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b155eb4

Please sign in to comment.