bots-garden/razorbillpublic Fork
⑂ v0.3.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
package-a-release.md · 44 lines · 2.5 KBmarkdown
Blame HistoryOpen raw

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

  1. 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.

  2. From the repository root, on the Mac:

    scripts/release.sh
    

    It 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 unpacked rzb --version prints the version. It ends by printing the archive and its checksum:

    dist/razorbill-0.3.0-macos-arm64.tar.gz
    <sha256>  razorbill-0.3.0-macos-arm64.tar.gz
    
  3. Check the server from the archive before publishing it, for example by unpacking it elsewhere and running rzb serve with a model.

  4. Tag the commit (git tag -a v0.3.0 -m "razorbill 0.3.0") and publish dist/razorbill-<version>-macos-arm64.tar.gz with its .sha256 file.

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/Release skips the build. This also works from Linux, where the final rzb --version check 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 with xattr -dr com.apple.quarantine <folder>. Developer ID signing and notarization are planned for 1.0.0.

See also

 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
# 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](build-on-the-mac.md).

## Steps

1. 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.
2. From the repository root, on the Mac:

   ```bash
   scripts/release.sh
   ```

   It 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 unpacked `rzb --version` prints the version. It ends by printing the archive and its checksum:

   ```
   dist/razorbill-0.3.0-macos-arm64.tar.gz
   <sha256>  razorbill-0.3.0-macos-arm64.tar.gz
   ```

3. Check the server from the archive before publishing it, for example by unpacking it elsewhere and running `rzb serve` with a model.
4. Tag the commit (`git tag -a v0.3.0 -m "razorbill 0.3.0"`) and publish `dist/razorbill-<version>-macos-arm64.tar.gz` with its `.sha256` file.

## 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](build-on-the-mac.md#install)).

## Variants

- **Package a build you already have**: `scripts/release.sh --products .build/xcode/Build/Products/Release` skips the build. This also works from Linux, where the final `rzb --version` check 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 with `xattr -dr com.apple.quarantine <folder>`. Developer ID signing and notarization are planned for 1.0.0.

## See also

- [Build rzb on the Mac](build-on-the-mac.md)
- [Run the tests](run-the-tests.md), to run before a release.