Mac: codesign app and dmg

Gets the cached CODESIGNID value via cmake and signs the app and dmg with it.
This commit is contained in:
Benitoite
2018-09-17 15:58:19 -07:00
committed by GitHub
parent efaae15f11
commit d6e4ba296e

View File

@@ -199,8 +199,11 @@ s|@arch@|${arch}|" \
"${CONTENTS}/Info.plist"
plutil -convert binary1 "${CONTENTS}/Info.plist"
# Sign the app
CODESIGNID="$(cmake .. -LA -N | grep "CODESIGNID" | cut -d "=" -f2)"
codesign --deep --force -v -s "${CODESIGNID}" "${APP}"
spctl -a -vvvv "${APP}"
function CreateDmg {
local srcDir="$(mktemp -dt $$)"
@@ -227,6 +230,9 @@ function CreateDmg {
msg "Creating disk image:"
hdiutil create -format UDBZ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg"
# Sign disk image
codesign --deep --force -v -s "${CODESIGNID}" "${dmg_name}.dmg"
# Zip disk image for redistribution
zip "${dmg_name}.zip" "${dmg_name}.dmg" AboutThisBuild.txt
rm "${dmg_name}.dmg"