How to package a release
This guide builds the release archive of razorbill: rzb and the resource bundles it needs, in one .tar.gz with its SHA-256. It assumes you can already build rzb on the Mac.
Steps
-
Set the version in
Sources/RazorbillCore/Razorbill.swift(static let version = "…"), update the version shown in the docs, and commit. The script refuses uncommitted changes. -
From the repository root, on the Mac:
scripts/release.shIt builds in Release into
.build/release(a folder of its own, so the first run compiles everything again), packages the build, unpacks the archive in a temporary folder and checks that the unpackedrzb --versionprints the version. It ends by printing the archive and its checksum:dist/razorbill-0.2.0-macos-arm64.tar.gz <sha256> razorbill-0.2.0-macos-arm64.tar.gz -
Check the server from the archive before publishing it, for example by unpacking it elsewhere and running
rzb servewith a model. -
Tag the commit (
git tag -a v0.2.0 -m "razorbill 0.2.0") and publishdist/razorbill-<version>-macos-arm64.tar.gzwith its.sha256file.
What the archive holds
| Entry | Role |
|---|---|
rzb |
The executable (Apple Silicon, macOS 14 or later). |
mlx-swift_Cmlx.bundle |
The MLX Metal library (default.metallib); without it no model loads. |
swift-transformers_Hub.bundle, swift-nio_*.bundle, swift-crypto_Crypto.bundle |
The other resource bundles of the dependencies. The script copies every *.bundle of the build. |
INSTALL.txt |
Where to put the folder, how to add it to PATH, how to clear the quarantine. |
The bundles must stay next to rzb: put the whole folder on PATH rather than copying rzb alone into /usr/local/bin. On a Mac with the sources, scripts/install.sh does this for you (Build rzb on the Mac).
Variants
- Package a build you already have:
scripts/release.sh --products .build/xcode/Build/Products/Releaseskips the build. This also works from Linux, where the finalrzb --versioncheck is skipped. - Test archive from uncommitted work: add
--allow-dirty. Do not publish such an archive. - Downloaded with a browser: macOS quarantines the archive and refuses to run
rzb, which is signed ad hoc only. Clear it withxattr -dr com.apple.quarantine <folder>. Developer ID signing and notarization are planned for 1.0.0.
See also
- Build rzb on the Mac
- Run the tests, to run before a release.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|