fix: release script — rename scarf.app → Scarf.app after export

Xcode exports the bundle as scarf.app because PRODUCT_NAME = $TARGET_NAME
and the target is lowercase "scarf". Users expect Scarf.app in their
/Applications folder. Renaming the bundle wrapper preserves the
signature (codesign signs contents, not the wrapper directory name).

Caught during a build+sign+verify dry run before the first notarized
release.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alan Wizemann
2026-04-16 18:59:41 -07:00
parent 75e489e39c
commit 9bdd928469
+8 -1
View File
@@ -106,8 +106,15 @@ xcodebuild \
-exportPath "$EXPORT_DIR" \ -exportPath "$EXPORT_DIR" \
-exportOptionsPlist "$EXPORT_OPTIONS" -exportOptionsPlist "$EXPORT_OPTIONS"
# Xcode exports as scarf.app (PRODUCT_NAME = $TARGET_NAME = "scarf"). Rename the
# wrapper to Scarf.app so users see properly-cased app in /Applications. Renaming
# the bundle directory does NOT invalidate the signature (codesign signs contents,
# not the wrapper folder name).
if [[ -d "$EXPORT_DIR/scarf.app" && ! -d "$EXPORT_DIR/Scarf.app" ]]; then
mv "$EXPORT_DIR/scarf.app" "$EXPORT_DIR/Scarf.app"
fi
APP_PATH="$EXPORT_DIR/Scarf.app" APP_PATH="$EXPORT_DIR/Scarf.app"
[[ -d "$APP_PATH" ]] || die "exported app not found at $APP_PATH (expected Scarf.app — confirm PRODUCT_NAME)" [[ -d "$APP_PATH" ]] || die "exported app not found at $APP_PATH"
# ---------- verify signature ---------- # ---------- verify signature ----------
log "Verify signature" log "Verify signature"