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
4 changes: 4 additions & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
run: |
raco pkg install --auto --no-docs "https://github.com/turinglambdaai/keel.git#${KEEL_PIN}"
raco pkg install --auto --no-docs "https://github.com/turinglambdaai/rivet.git#${RIVET_PIN}"
- name: Render DMG artwork from SVG
run: |
brew install librsvg
bash scripts/render-dmg-background.sh
- name: Run executable acceptance contract
shell: bash
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
raco pkg install --auto --no-docs 'https://github.com/turinglambdaai/rivet.git#${{ env.RIVET_PIN }}'
- name: Version preflight (VERSION == rivet.rktd == updater == tag)
run: bash scripts/check-release-version.sh "${{ github.ref_name }}"
# The Finder DMG uses the PNG, not the editable SVG. Regenerate it so
# artwork changes always land in the release (Rivet uses a 660x400 view).
- name: Render DMG artwork from SVG
run: |
brew install librsvg
bash scripts/render-dmg-background.sh
# DMG (human installer) + portable zip + SBOM + notices, launch
# smoke included. The macOS update feed entry is the portable zip,
# assembled by scripts/make-update-manifest.sh in the publish job.
Expand Down
17 changes: 9 additions & 8 deletions assets/dmg-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions scripts/render-dmg-background.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# The SVG is the editable source; Rivet stages the PNG named in rivet.rktd.
# Run before packaging on macOS so the release never ships stale artwork.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
svg="$root/assets/dmg-background.svg"
png="$root/assets/dmg-background.png"
if ! command -v rsvg-convert >/dev/null 2>&1; then
echo "rsvg-convert is required (macOS: brew install librsvg)" >&2
exit 1
fi
rsvg-convert --format png --output "$png" "$svg"
# Fail before Rivet if the generated image no longer matches its fixed Finder
# window geometry (660x400 at 2x): a valid PNG may still crop/misalign icons.
python3 - "$png" <<'PY'
import struct
import sys
with open(sys.argv[1], "rb") as stream:
header = stream.read(24)
if header[:8] != b"\x89PNG\r\n\x1a\n" or header[12:16] != b"IHDR":
raise SystemExit("DMG artwork is not a valid PNG")
size = struct.unpack(">II", header[16:24])
if size != (1320, 800):
raise SystemExit(f"DMG artwork must be 1320x800, got {size}")
print(f"Rendered DMG artwork: {size[0]}x{size[1]}")
PY
Loading