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: 9 additions & 2 deletions .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ jobs:
target_os: linux
arch: x86_64
binary: rob
- os: macos-latest
- os: macos-15
target_os: macos
arch: aarch64
binary: rob
# Standard (free) runner on public repos; no -large suffix needed.
# Emits macos-x86_64 so Rokit can serve Intel Macs, which it otherwise
# cannot detect: Rokit validates OS but not architecture.
- os: macos-15-intel
target_os: macos
arch: x86_64
binary: rob
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -159,7 +166,7 @@ jobs:
found=$((found + 1))
test "$(tr -d '\r\n' < "$file")" = "$expected"
done < <(find commits -name built-commit.txt | sort)
test "$found" -eq 3
test "$found" -eq 4

- name: Upload without replacing assets
env:
Expand Down
11 changes: 4 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ lookup falls back to scoring the executable suffix and contents instead of an
exact filename match. Installation works today; matching the repository name
would remove that fallback.

> [!warning] Intel Macs
> There is no `macos-x86_64` archive. Rokit 1.2.0 checks the operating system
> of the downloaded binary but **not** its architecture, so on an Intel Mac
> `rokit install` reports success and `rob --version` then fails to execute.
> Use the source build below instead, or omit `rob` from the manifest there.

**Rokit 1.2.0 does not read the `.sha256` sidecar.** If you need integrity
beyond a pinned version, a GitHub Release, and Rokit's own trust prompt,
verify the digest yourself as shown under the release archive section.
Expand All @@ -194,7 +188,10 @@ cargo install --path . --locked
### From a GitHub Release archive

Download one approved archive and its `.sha256` file for the same version:
Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, or macOS aarch64 `.tar.gz`.
Windows x86_64 `.zip`, Linux x86_64 `.tar.gz`, macOS aarch64 `.tar.gz`, or
macOS x86_64 `.tar.gz`. The Intel archive was added after `0.8.0` and is being
backfilled onto it; until that lands, use the source build for Intel Macs on
exactly `0.8.0`.
Compare the SHA-256 digest before extracting. A match checks the bytes only.
It does not prove publisher identity, and these archives are not signed or
notarized. The archive contains `rob` or `rob.exe` plus `license-mit` and
Expand Down
13 changes: 10 additions & 3 deletions scripts/package-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
("windows", "x86_64"): ("rob.exe", "zip"),
("linux", "x86_64"): ("rob", "tar.gz"),
("macos", "aarch64"): ("rob", "tar.gz"),
("macos", "x86_64"): ("rob", "tar.gz"),
}
LICENSES = ("license-mit", "license-apache")

Expand Down Expand Up @@ -42,8 +43,12 @@ def main() -> None:
args = parser.parse_args()
try:
name, binary_name = archive_name(args.version, args.system, args.arch)
except (KeyError, ValueError) as error:
raise SystemExit(str(error) or "target is outside the approved archive matrix") from error
except KeyError:
raise SystemExit(
f"target {args.system}/{args.arch} is outside the approved archive matrix"
) from None
except ValueError as error:
raise SystemExit(str(error)) from error
if args.binary.name != binary_name or not args.binary.is_file():
raise SystemExit("binary name is outside the approved archive member list")
licenses = [args.licenses / item for item in LICENSES]
Expand All @@ -64,7 +69,9 @@ def main() -> None:
archive.add(path, arcname=path.name)
digest = hashlib.sha256(destination.read_bytes()).hexdigest()
checksum = args.out / f"{name}.sha256"
checksum.write_text(f"{digest} {name}\n", encoding="utf-8")
# Pin the newline so the file stays `sha256sum -c` compatible on every host.
with checksum.open("w", encoding="utf-8", newline="\n") as handle:
handle.write(f"{digest} {name}\n")
print(checksum)


Expand Down
Loading