chore: chain rename + bump to v0.16.0 (mirror URLs, fix auto-update)

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-06-17 17:19:01 +02:00
parent 425d4166af
commit 2d8e9f4048
2 changed files with 30 additions and 32 deletions

View file

@ -2,20 +2,20 @@
# #
# Lives here as the canonical source of truth. The bootstrap # Lives here as the canonical source of truth. The bootstrap
# script (scripts/bootstrap-distribution-repos.sh in # script (scripts/bootstrap-distribution-repos.sh in
# fai/platform) seeds this file into the tap repo at # fai/chain-private) seeds this file into the tap repo at
# .forgejo/workflows/update.yml. Edit it here, run the # .forgejo/workflows/update.yml. Edit it here, run the
# bootstrap script, the tap repo picks up the new version. # bootstrap script, the tap repo picks up the new version.
# #
# What it does: # What it does:
# * Every 4 hours, fetches the latest release manifest for # * Every 4 hours, fetches the latest release manifest for
# fai/platform. # fai/chain-private.
# * If the version differs from the one currently in # * If the version differs from the one currently in
# Formula/fai.rb, rewrites the formula's version + sha256 # Formula/chain.rb, rewrites the formula's version + sha256
# entries (macos-aarch64 + macos-x86_64) and commits. # entries (macos-aarch64 + macos-x86_64) and commits.
# * Workflow_dispatch trigger lets you force an update from # * Workflow_dispatch trigger lets you force an update from
# the Forgejo UI without waiting for the cron tick. # the Forgejo UI without waiting for the cron tick.
# #
# Manifest contract: fai/platform's release.yml writes # Manifest contract: fai/chain-private's release.yml writes
# .binaries.{macos-aarch64,macos-x86_64}.sha256 — see # .binaries.{macos-aarch64,macos-x86_64}.sha256 — see
# crates/fai_hub/src/update.rs::ReleaseManifest for the # crates/fai_hub/src/update.rs::ReleaseManifest for the
# authoritative schema. # authoritative schema.
@ -53,12 +53,12 @@ jobs:
set -eu set -eu
# Forgejo's releases API returns newest-first. # Forgejo's releases API returns newest-first.
REL=$(curl -fsSL \ REL=$(curl -fsSL \
"https://git.flemming.ai/api/v1/repos/fai/platform/releases?limit=1" \ "https://git.flemming.ai/api/v1/repos/fai/chain-private/releases?limit=1" \
| jq -r '.[0]') | jq -r '.[0]')
TAG=$(echo "$REL" | jq -r '.tag_name') TAG=$(echo "$REL" | jq -r '.tag_name')
VERSION="${TAG#v}" VERSION="${TAG#v}"
MANIFEST=$(curl -fsSL \ MANIFEST=$(curl -fsSL \
"https://git.flemming.ai/fai/platform/releases/download/${TAG}/manifest.json") "https://git.flemming.ai/fai/chain-private/releases/download/${TAG}/manifest.json")
MAC_ARM=$(echo "$MANIFEST" | jq -r '.binaries["macos-aarch64"].sha256 // empty') MAC_ARM=$(echo "$MANIFEST" | jq -r '.binaries["macos-aarch64"].sha256 // empty')
MAC_X64=$(echo "$MANIFEST" | jq -r '.binaries["macos-x86_64"].sha256 // empty') MAC_X64=$(echo "$MANIFEST" | jq -r '.binaries["macos-x86_64"].sha256 // empty')
if [ -z "$MAC_ARM" ] || [ -z "$MAC_X64" ]; then if [ -z "$MAC_ARM" ] || [ -z "$MAC_X64" ]; then
@ -75,11 +75,11 @@ jobs:
id: current id: current
if: steps.manifest.outputs.skip != 'true' if: steps.manifest.outputs.skip != 'true'
run: | run: |
CUR=$(grep -E '^\s*version\s+"' Formula/fai.rb \ CUR=$(grep -E '^\s*version\s+"' Formula/chain.rb \
| head -1 | sed -E 's/.*"([^"]+)".*/\1/') | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
echo "version=$CUR" >> "$GITHUB_OUTPUT" echo "version=$CUR" >> "$GITHUB_OUTPUT"
- name: Rewrite Formula/fai.rb - name: Rewrite Formula/chain.rb
id: rewrite id: rewrite
if: | if: |
steps.manifest.outputs.skip != 'true' steps.manifest.outputs.skip != 'true'
@ -92,7 +92,7 @@ jobs:
set -eu set -eu
python3 - <<'PY' python3 - <<'PY'
import os, re, pathlib import os, re, pathlib
p = pathlib.Path("Formula/fai.rb") p = pathlib.Path("Formula/chain.rb")
src = p.read_text() src = p.read_text()
new_version = os.environ["NEW_VERSION"] new_version = os.environ["NEW_VERSION"]
arm_sha = os.environ["NEW_SHA_AARCH64"] arm_sha = os.environ["NEW_SHA_AARCH64"]
@ -126,8 +126,8 @@ jobs:
NEW_VERSION: ${{ steps.manifest.outputs.version }} NEW_VERSION: ${{ steps.manifest.outputs.version }}
run: | run: |
set -eu set -eu
git config user.email "platform@flemming.ai" git config user.email "chain@flemming.ai"
git config user.name "fai-tap-bot" git config user.name "fai-tap-bot"
git add Formula/fai.rb git add Formula/chain.rb
git commit -s -m "chore: formula -> v${NEW_VERSION}" git commit -s -m "chore: formula -> v${NEW_VERSION}"
git push origin "HEAD:${GITHUB_REF_NAME}" git push origin "HEAD:${GITHUB_REF_NAME}"

View file

@ -1,10 +1,10 @@
# Homebrew formula skeleton for the F∆I Platform CLI. # Homebrew formula skeleton for the Ch∆In CLI.
# #
# Lives in this repo as the canonical source — the actual # Lives in this repo as the canonical source — the actual
# distribution is a checkout of `fai/homebrew-tap` (a separate # distribution is a checkout of `fai/homebrew-tap` (a separate
# Forgejo repo, seeded by # Forgejo repo, seeded by
# `scripts/bootstrap-distribution-repos.sh`) that carries a copy # `scripts/bootstrap-distribution-repos.sh`) that carries a copy
# of this file at `Formula/fai.rb`. The tap repo's # of this file at `Formula/chain.rb`. The tap repo's
# `.forgejo/workflows/update.yml` (sourced from # `.forgejo/workflows/update.yml` (sourced from
# `installer/homebrew/forgejo-workflow-update.yml` in this repo) # `installer/homebrew/forgejo-workflow-update.yml` in this repo)
# auto-bumps the version + sha256 entries against each new # auto-bumps the version + sha256 entries against each new
@ -13,23 +13,23 @@
# To install a release from the tap: # To install a release from the tap:
# #
# brew tap fai/tap https://git.flemming.ai/fai/homebrew-tap # brew tap fai/tap https://git.flemming.ai/fai/homebrew-tap
# brew install fai # brew install chain
# #
# To install from this checkout for testing: # To install from this checkout for testing:
# #
# brew install --build-from-source ./installer/homebrew/fai.rb # brew install --build-from-source ./installer/homebrew/chain.rb
# #
# This file is a *skeleton*. The :url / :sha256 placeholders are # This file is a *skeleton*. The :url / :sha256 placeholders are
# populated by the release pipeline once macOS builds land on the # populated by the release pipeline once macOS builds land on the
# Forgejo Release page. The class name (`Fai`) is what Homebrew # Forgejo Release page. The class name (`Chain`) is what Homebrew
# uses to address the formula; lowercase `fai` is the binary on # uses to address the formula; lowercase `chain` is the binary on
# disk after install. # disk after install.
class Fai < Formula class Chain < Formula
desc "Deterministic workflow engine for AI-assisted data " \ desc "Deterministic workflow engine for AI-assisted data " \
"processing in regulated environments" "processing in regulated environments"
homepage "https://flemming.ai" homepage "https://flemming.ai"
version "0.12.3" version "0.16.0"
license "Apache-2.0" license "Apache-2.0"
# Platform-specific binary URLs + sha256 are filled in per # Platform-specific binary URLs + sha256 are filled in per
@ -37,35 +37,33 @@ class Fai < Formula
# same release; the formula consumes them on Apple Silicon and # same release; the formula consumes them on Apple Silicon and
# Intel macs via stanza selectors. # Intel macs via stanza selectors.
if Hardware::CPU.arm? if Hardware::CPU.arm?
url "https://git.flemming.ai/fai/platform/releases/download/" \ url "https://releases.chain.flemming.ai/v#{version}/chain-macos-aarch64"
"v#{version}/fai-macos-aarch64" sha256 "4995c355e79e6afeda34f04e2216c5736d9f088c0392122cd3d6a08f7d1eabf7"
sha256 "7a43bebe1c011804f0fdf9ffe5ae36b4356128822a0c105d7c7da294912e5d31"
else else
url "https://git.flemming.ai/fai/platform/releases/download/" \ url "https://releases.chain.flemming.ai/v#{version}/chain-macos-x86_64"
"v#{version}/fai-macos-x86_64" sha256 "f50cae5477105e2734fb9c92b7d1889fbbb4e848297fa41ec72638b3c63f5916"
sha256 "10535025b7ded094ca44a1189f530d016812dc40d6d7139c333ddf451c4ccc12"
end end
# Plain binary — no source build needed. We rely on the upstream # Plain binary — no source build needed. We rely on the upstream
# CI to have produced + signed it. Notarization is a separate # CI to have produced + signed it. Notarization is a separate
# follow-up. # follow-up.
def install def install
bin.install Dir["*"].first => "fai" bin.install Dir["*"].first => "chain"
end end
# `brew test fai` runs this — keeps the formula honest. We don't # `brew test chain` runs this — keeps the formula honest. We don't
# start the daemon; we only verify the binary is callable. # start the daemon; we only verify the binary is callable.
test do test do
assert_match version.to_s, shell_output("#{bin}/fai --version") assert_match version.to_s, shell_output("#{bin}/chain --version")
end end
def caveats def caveats
<<~EOS <<~EOS
The FI daemon is not started automatically. After install: The ChIn daemon is not started automatically. After install:
fai bootstrap # writes ~/.fai/ layout + PATH marker chain bootstrap # writes ~/.chain/ layout + PATH marker
fai daemon start # starts the local hub chain daemon start # starts the local hub
fai install debug.echo # smoke-test the install path chain install debug.echo # smoke-test the install path
For Studio, install separately from For Studio, install separately from
https://flemming.ai/get. https://flemming.ai/get.