Skip to content

Commit 20379f3

Browse files
charlieseayclaude
andcommitted
checkpoint: update binnacle repository changes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c456fad commit 20379f3

2 files changed

Lines changed: 107 additions & 3 deletions

File tree

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,40 @@ Built with Swift 6 and the [MCP Swift SDK](https://github.com/modelcontextprotoc
66

77
## Install
88

9+
Purchase from the Seaynic Labs Store, then download from your account:
10+
911
```bash
10-
brew tap seayniclabs/tap
11-
brew install binnacle
12+
open https://store.seayniclabs.com/products/binnacle
13+
# after purchase
14+
open https://store.seayniclabs.com/account/downloads
1215
```
1316

14-
Or build from source:
17+
For local development, build from source:
1518

1619
```bash
1720
git clone https://github.com/seayniclabs/binnacle.git
1821
cd binnacle
1922
swift build -c release
2023
```
2124

25+
## Release (Signed + Notarized)
26+
27+
Use the release script to build, sign, package, notarize, and verify:
28+
29+
```bash
30+
export BINNACLE_VERSION=v0.2.0
31+
export APP_SIGN_IDENTITY="Developer ID Application: <Team Name> (<TEAM_ID>)"
32+
export PKG_SIGN_IDENTITY="Developer ID Installer: <Team Name> (<TEAM_ID>)"
33+
export NOTARY_PROFILE="<notarytool-keychain-profile>"
34+
35+
./scripts/release-notarize.sh
36+
```
37+
38+
This produces:
39+
40+
- `dist/binnacle-vX.Y.Z-arm64.pkg` (+ `.sha256`)
41+
- `dist/binnacle-vX.Y.Z-arm64-macos.tar.gz` (+ `.sha256`)
42+
2243
## Setup
2344

2445
Run the setup command to grant Calendar and Reminders access:

scripts/release-notarize.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Binnacle release pipeline:
5+
# 1) Build release binary
6+
# 2) Sign binary with Developer ID Application
7+
# 3) Build + sign installer pkg with Developer ID Installer
8+
# 4) Submit pkg for notarization and wait
9+
# 5) Staple + verify pkg
10+
#
11+
# Required env vars:
12+
# BINNACLE_VERSION e.g. v0.2.0
13+
# APP_SIGN_IDENTITY e.g. Developer ID Application: Seaynic Labs LLC (TEAMID)
14+
# PKG_SIGN_IDENTITY e.g. Developer ID Installer: Seaynic Labs LLC (TEAMID)
15+
# NOTARY_PROFILE keychain profile created by `xcrun notarytool store-credentials`
16+
#
17+
# Optional:
18+
# TEAM_ID Apple Team ID (used only for release summary output)
19+
20+
if [[ -z "${BINNACLE_VERSION:-}" || -z "${APP_SIGN_IDENTITY:-}" || -z "${PKG_SIGN_IDENTITY:-}" || -z "${NOTARY_PROFILE:-}" ]]; then
21+
echo "Missing required environment variables."
22+
echo "Required: BINNACLE_VERSION, APP_SIGN_IDENTITY, PKG_SIGN_IDENTITY, NOTARY_PROFILE"
23+
exit 1
24+
fi
25+
26+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
27+
DIST_DIR="${ROOT_DIR}/dist"
28+
PKG_ROOT="${DIST_DIR}/pkgroot"
29+
UNSIGNED_BIN="${DIST_DIR}/Binnacle"
30+
SIGNED_BIN="${DIST_DIR}/binnacle"
31+
PKG_PATH="${DIST_DIR}/binnacle-${BINNACLE_VERSION}-arm64.pkg"
32+
TARBALL_PATH="${DIST_DIR}/binnacle-${BINNACLE_VERSION}-arm64-macos.tar.gz"
33+
34+
echo "==> Building release binary"
35+
swift build -c release --package-path "${ROOT_DIR}"
36+
cp "${ROOT_DIR}/.build/arm64-apple-macosx/release/Binnacle" "${UNSIGNED_BIN}"
37+
chmod 755 "${UNSIGNED_BIN}"
38+
39+
echo "==> Signing binary (${APP_SIGN_IDENTITY})"
40+
cp "${UNSIGNED_BIN}" "${SIGNED_BIN}"
41+
codesign --force --timestamp --options runtime --sign "${APP_SIGN_IDENTITY}" "${SIGNED_BIN}"
42+
codesign --verify --deep --strict --verbose=2 "${SIGNED_BIN}"
43+
44+
echo "==> Preparing pkg root"
45+
rm -rf "${PKG_ROOT}"
46+
mkdir -p "${PKG_ROOT}/usr/local/bin"
47+
cp "${SIGNED_BIN}" "${PKG_ROOT}/usr/local/bin/binnacle"
48+
chmod 755 "${PKG_ROOT}/usr/local/bin/binnacle"
49+
50+
echo "==> Building signed installer pkg (${PKG_SIGN_IDENTITY})"
51+
rm -f "${PKG_PATH}"
52+
pkgbuild \
53+
--root "${PKG_ROOT}" \
54+
--identifier "com.seayniclabs.binnacle" \
55+
--version "${BINNACLE_VERSION#v}" \
56+
--install-location "/" \
57+
--sign "${PKG_SIGN_IDENTITY}" \
58+
"${PKG_PATH}"
59+
60+
echo "==> Notarizing pkg (${NOTARY_PROFILE})"
61+
xcrun notarytool submit "${PKG_PATH}" --keychain-profile "${NOTARY_PROFILE}" --wait
62+
63+
echo "==> Stapling and verifying pkg"
64+
xcrun stapler staple "${PKG_PATH}"
65+
spctl -a -vv -t install "${PKG_PATH}"
66+
pkgutil --check-signature "${PKG_PATH}"
67+
68+
echo "==> Creating signed tarball for store delivery"
69+
tar -czf "${TARBALL_PATH}" -C "${DIST_DIR}" binnacle
70+
71+
echo "==> Writing checksums"
72+
shasum -a 256 "${PKG_PATH}" > "${PKG_PATH}.sha256"
73+
shasum -a 256 "${TARBALL_PATH}" > "${TARBALL_PATH}.sha256"
74+
75+
echo
76+
echo "Release artifacts ready:"
77+
echo " ${PKG_PATH}"
78+
echo " ${PKG_PATH}.sha256"
79+
echo " ${TARBALL_PATH}"
80+
echo " ${TARBALL_PATH}.sha256"
81+
if [[ -n "${TEAM_ID:-}" ]]; then
82+
echo " Team ID: ${TEAM_ID}"
83+
fi

0 commit comments

Comments
 (0)