Skip to content

Commit

Permalink
Sign dmg and add hardened runtime and timestamp to signature
Browse files Browse the repository at this point in the history
  • Loading branch information
mtibben committed Oct 29, 2019
1 parent 41610ce commit 8ae71d8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/create-dmg
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ cp -a $BIN_PATH $tmpdir/aws-vault
src_path="$tmpdir/aws-vault"

echo "Signing binary"
codesign -s "$CERT_ID" "$src_path"
codesign --options runtime --timestamp --sign "$CERT_ID" "$src_path"

echo "Creating dmg"
hdiutil create -quiet -srcfolder $src_path $DMG_PATH
hdiutil create -quiet -srcfolder "$src_path" "$DMG_PATH"

echo "Signing dmg"
codesign --timestamp --sign "$CERT_ID" "$DMG_PATH"

echo "Submitting notorization request"
request_uuid=$(xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --username "$APPLE_ID_USERNAME" --password "$APPLE_ID_APP_PASSWORD" --file $DMG_PATH 2>&1 \
| awk '/RequestUUID/ { print $NF; }')
echo "Finished submitting, got Request UUID $request_uuid"

echo "RequestUUID: $request_uuid"
echo -n "Waiting for notorization to complete"
while [[ "$(notarization_status "$request_uuid")" == "in progress" ]] ; do
echo -n .
Expand Down

0 comments on commit 8ae71d8

Please sign in to comment.