Release
Build process
App bundle
scripts/build-app.sh creates a signed app bundle:
- Builds the
BucklerApptarget in release mode - Creates the bundle structure with
Contents/MacOS/,Contents/Resources/ - Copies the app icon and
Info.plistfromscripts/ - Signs the bundle with hardened runtime
Local builds use an ad-hoc signature. Release builds use a Developer ID certificate.
Release package
scripts/release.sh makes a release of main. Run it after each merge to main, when scripts/e2e.sh passes. Buckler uses two repositories:
| Repository | Visibility | Holds |
|---|---|---|
caretak3r/buckler | Private | The source code, the version commits and the vX.Y.Z tags |
caretak3r/homebrew-buckler | Public | The GitHub releases with the zip files, the Homebrew cask, the README and its images |
The script does these steps:
- It reads the commits since the last
vX.Y.Ztag and finds the next version (see Version rule). - It writes the version with
scripts/version.sh setand moves the Unreleased notes inCHANGELOG.mdunder the new version. If Unreleased is empty, it writes the notes from the commit subjects. - It builds
Buckler.appwithbuild-app.shand makesbuild/Buckler-X.Y.Z.zip. - It commits
chore(release): vX.Y.Z, tagsvX.Y.Zand pushes both to the private repository. - It publishes a GitHub release in the public repository with the zip file and the changelog section.
- It copies
tap/README.mdandtap/imagesto the public repository, writesCasks/buckler.rbwith the new version and SHA-256, and commits and pushesBuckler X.Y.Z. The local clone of the public repository isbuild/tap.
scripts/release.sh --dry-run # show the next version and the notes, change nothing
scripts/release.sh # release main
scripts/release.sh --major # force a major releaseThe script stops when the branch is not main, when the working tree has changes, when main differs from origin/main, or when it cannot reach the public repository. It exits without a release when no commits come after the last tag, except release and cask commits.
Version rule
The script uses the Conventional Commits types since the last tag:
| Commits since the last tag | Next version |
|---|---|
A type with ! (for example feat!:), or a BREAKING CHANGE: footer | MAJOR |
Any feat or fix | MINOR |
Only other types (docs, test, chore, refactor, …) | PATCH |
Merge commits, chore(release): and chore(cask): commits do not count.
Signing
Release builds require:
- A Developer ID Application certificate in the Keychain
- Hardened runtime entitlements (already configured in
build-app.sh)
The script signs with:
codesign --force --sign "Developer ID Application: ..." \
--options runtime \
Buckler.appNotarization
Notarization uses notarytool with a keychain profile.
Create the profile once:
xcrun notarytool store-credentials NOTARY_PROFILE \
--apple-id "your-apple-id" \
--team-id "YOUR_TEAM_ID" \
--password "app-specific-password"Submit the release archive:
xcrun notarytool submit buckler-VERSION.zip \
--keychain-profile NOTARY_PROFILE \
--waitStaple the ticket to the app:
xcrun stapler staple Buckler.appStatus: Developer ID notarization is planned but not automated yet.
Homebrew cask
scripts/release.sh writes Casks/buckler.rb in the public repository for each release. Do not edit it by hand. The public repository is the tap: brew tap caretak3r/buckler clones caretak3r/homebrew-buckler. The cask downloads the zip file from the public release, so a GitHub token is not necessary. It installs Buckler.app and links buckler, the command line tool in Buckler.app/Contents/Helpers.
brew tap caretak3r/buckler
brew trust caretak3r/buckler
brew install --cask caretak3r/buckler/bucklerREADME images
The images in the README of both repositories are in tap/images. scripts/screenshots.sh makes them again: it runs the built app on the e2e demo data, light and dark, and captures the status menu, the Findings window, the Providers window and the General pane of Settings.
bash scripts/build-app.sh
bash scripts/screenshots.shThe script needs the same permissions as the UI step of e2e.sh, and the menu bar must be visible. Like the UI step, it opens windows and menus on your screen, so do not use the Mac while it runs. The next release copies the new images to the public repository.
Versioning
The file VERSION at the repository root is the one version source. It holds a version as X.Y.Z. scripts/version.sh writes the version to the files that need a copy:
| File | Holds |
|---|---|
VERSION | The source |
Sources/BucklerCore/Version.swift | BucklerVersion.current, which buckler --version and the About pane print |
scripts/Info.plist | CFBundleShortVersionString |
Do not edit the copies by hand. Use the script:
scripts/version.sh show # print the version
scripts/version.sh set 0.2.0 # set an exact version
scripts/version.sh bump patch # or minor, or major
scripts/version.sh check # exit 1 when the files disagree
scripts/version.sh check v0.2.0 # also compare a release tagcheck prints one line for each file that does not match VERSION, and exits with code 1. With a tag, it also fails when the tag is not v followed by the version. Run it in CI before a release.
The build number (CFBundleVersion) is not in the source tree. scripts/build-app.sh stamps it into the built bundle only. The value is the CI run number (GITHUB_RUN_NUMBER). Without CI it is the number of commits (git rev-list --count HEAD). Without git it is 0. build-app.sh runs version.sh check first and stops when the files disagree.
CHANGELOG.md follows Keep a Changelog. Put each change under Unreleased. scripts/release.sh moves the Unreleased notes under the new version.
Checklist
For each release:
- Merge to
mainthrough the gate:swift build,swift testandscripts/e2e.shpass. When the merge changes the UI, also runscripts/e2e.sh --uiwhile you do not use the Mac - Run
scripts/release.sh - Check the release page of the public repository and the new tag
Before Buckler is announced:
- Sign with a Developer ID certificate and notarize (
NOTARY_PROFILE), so users do not have to remove the quarantine attribute