Skip to content

Commit f16a401

Browse files
committed
chore: update package script
1 parent e31f960 commit f16a401

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ That command creates:
4747
- `dist/Loopndroll.app`
4848
- `dist/Loopndroll.app.zip`
4949

50+
To sign with a real Developer ID certificate instead of ad-hoc signing:
51+
52+
```bash
53+
SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" ./scripts/package_app.sh
54+
```
55+
56+
You can list available code-signing identities with:
57+
58+
```bash
59+
security find-identity -v -p codesigning
60+
```
61+
5062
## Structure
5163

5264
- `Sources/LoopndrollCore`: install/repair logic, state store, hook decision engine, and prompt rendering

scripts/package_app.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CONTENTS_DIR="$APP_DIR/Contents"
1010
MACOS_DIR="$CONTENTS_DIR/MacOS"
1111
RESOURCES_DIR="$CONTENTS_DIR/Resources"
1212
ZIP_PATH="$DIST_DIR/$APP_NAME.app.zip"
13+
SIGN_IDENTITY="${SIGN_IDENTITY:--}"
1314

1415
cd "$ROOT_DIR"
1516

@@ -25,8 +26,14 @@ cp "$ROOT_DIR/Packaging/Info.plist" "$CONTENTS_DIR/Info.plist"
2526
chmod 755 "$MACOS_DIR/$APP_NAME"
2627
printf 'APPL????' > "$CONTENTS_DIR/PkgInfo"
2728

28-
echo "Applying ad-hoc signature..."
29-
codesign --force --deep --sign - "$APP_DIR"
29+
if [[ "$SIGN_IDENTITY" == "-" ]]; then
30+
echo "Applying ad-hoc signature..."
31+
CODESIGN_ARGS=(--force --deep --sign "$SIGN_IDENTITY")
32+
else
33+
echo "Signing with identity: $SIGN_IDENTITY"
34+
CODESIGN_ARGS=(--force --deep --options runtime --sign "$SIGN_IDENTITY")
35+
fi
36+
codesign "${CODESIGN_ARGS[@]}" "$APP_DIR"
3037

3138
echo "Creating zip archive..."
3239
rm -f "$ZIP_PATH"

0 commit comments

Comments
 (0)