Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,14 @@ icon). That also matters for notifications: `UNUserNotificationCenter`
traps in a raw binary, so the app posts native notifications only from
the bundle and falls back to `osascript display notification` otherwise
(e.g. `swift run Timber`).

## Install a release download

Release zips carry a universal (`arm64` + `x86_64`) build with an
ad-hoc signature (no notarization). On first launch Gatekeeper will
refuse a plain double-click; instead right-click (or Ctrl-click)
`Timber.app` → Open → Open, or clear quarantine once:

```sh
xattr -d com.apple.quarantine Timber.app # path to your copy
```
20 changes: 16 additions & 4 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,25 @@ fi
# sandbox so it runs without an approval prompt; scratch output already
# lives in .build.
SWIFT_PM_FLAGS="--disable-sandbox --cache-path /tmp/swiftpm-cache --config-path /tmp/swiftpm-config --security-path /tmp/swiftpm-security"
swift build $SWIFT_PM_FLAGS
BIN_DIR="$(swift build $SWIFT_PM_FLAGS --show-bin-path)"
# Plain `swift build` emits a native-arch-only binary (arm64 on current
# runners), which cannot launch on Intel Macs. Build both slices and
# combine them so one release zip runs everywhere. Each triple gets
# its own scratch dir since they otherwise share one output path and
# the second build overwrites the first.
swift build $SWIFT_PM_FLAGS --scratch-path .build/arm64 --triple arm64-apple-macosx
swift build $SWIFT_PM_FLAGS --scratch-path .build/x86_64 --triple x86_64-apple-macosx
ARM_BIN="$(swift build $SWIFT_PM_FLAGS --scratch-path .build/arm64 --triple arm64-apple-macosx --show-bin-path)"
X86_BIN="$(swift build $SWIFT_PM_FLAGS --scratch-path .build/x86_64 --triple x86_64-apple-macosx --show-bin-path)"
rm -rf dist/TimberMenu.app dist/Timber.app
mkdir -p dist/Timber.app/Contents/MacOS dist/Timber.app/Contents/Resources
cp "$BIN_DIR/Timber" dist/Timber.app/Contents/MacOS/Timber
lipo -create "$ARM_BIN/Timber" "$X86_BIN/Timber" -output dist/Timber.app/Contents/MacOS/Timber
cp packaging/Info.plist dist/Timber.app/Contents/Info.plist
cp -R "$BIN_DIR/Timber_Timber.bundle" dist/Timber.app/Contents/Resources/
cp -R "$ARM_BIN/Timber_Timber.bundle" dist/Timber.app/Contents/Resources/
# Ad-hoc sign so Gatekeeper treats a downloaded copy as an intact app
# bundle instead of reporting it as damaged. Still unsigned for
# Gatekeeper's notarization check, so first launch needs right-click Open.
codesign --force --deep --sign - dist/Timber.app
codesign --verify --verbose dist/Timber.app
"""

[tasks.test]
Expand Down
Loading