Skip to content

Commit 7d32974

Browse files
committed
chore(pkgbuild): delete existing app during preinstall, spctl --assess during postinstall
1 parent e8e4004 commit 7d32974

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

pkgbuild/scripts/postinstall

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
RUNNING_MARKER_FILE="/tmp/coder_desktop_running"
44
VPN_MARKER_FILE="/tmp/coder_vpn_was_running"
55

6+
# Before this script, or the user opens the app, make sure
7+
# Gatekeeper has ingested the notarization ticket.
8+
spctl -avvv "/Applications/Coder Desktop.app"
9+
610
# Restart Coder Desktop if it was running before
711
if [ -f "$RUNNING_MARKER_FILE" ]; then
812
echo "Starting Coder Desktop..."

pkgbuild/scripts/preinstall

+7
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,11 @@ echo "Asking com.coder.Coder-Desktop to quit..."
3535
osascript -e 'if app id "com.coder.Coder-Desktop" is running then' -e 'quit app id "com.coder.Coder-Desktop"' -e 'end if'
3636
echo "Done."
3737

38+
APP="/Applications/Coder Desktop.app"
39+
if [ -d "$APP" ]; then
40+
echo "Deleting Coder Desktop..."
41+
rm -rf "$APP"
42+
echo "Done."
43+
fi
44+
3845
exit 0

0 commit comments

Comments
 (0)