feat: seed Homebrew formula + auto-update workflow
Mirror of installer/homebrew/fai.rb in fai/platform. Source of truth is the platform repo; this is a passive distribution mirror. Auto-update workflow at .forgejo/workflows/update.yml runs every 4 hours, diffs the latest platform release against Formula/fai.rb, and rewrites version + sha256 when a new version ships. Manual trigger via workflow_dispatch. Users install with: brew tap fai/tap https://git.flemming.ai/fai/homebrew-tap brew install fai End-state matches Phase 1 of docs/releases/go-live-checklist.md.
This commit is contained in:
commit
1c0eb6c668
3 changed files with 236 additions and 0 deletions
78
Formula/fai.rb
Normal file
78
Formula/fai.rb
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# Homebrew formula skeleton for the F∆I Platform CLI.
|
||||
#
|
||||
# Lives in this repo as the canonical source — the actual
|
||||
# distribution is a checkout of `fai/homebrew-tap` (a separate
|
||||
# Forgejo repo, seeded by
|
||||
# `scripts/bootstrap-distribution-repos.sh`) that carries a copy
|
||||
# of this file at `Formula/fai.rb`. The tap repo's
|
||||
# `.forgejo/workflows/update.yml` (sourced from
|
||||
# `installer/homebrew/forgejo-workflow-update.yml` in this repo)
|
||||
# auto-bumps the version + sha256 entries against each new
|
||||
# platform release on a 4-hourly cron.
|
||||
#
|
||||
# To install a release from the tap:
|
||||
#
|
||||
# brew tap fai/tap https://git.flemming.ai/fai/homebrew-tap
|
||||
# brew install fai
|
||||
#
|
||||
# To install from this checkout for testing:
|
||||
#
|
||||
# brew install --build-from-source ./installer/homebrew/fai.rb
|
||||
#
|
||||
# This file is a *skeleton*. The :url / :sha256 placeholders are
|
||||
# populated by the release pipeline once macOS builds land on the
|
||||
# Forgejo Release page. The class name (`Fai`) is what Homebrew
|
||||
# uses to address the formula; lowercase `fai` is the binary on
|
||||
# disk after install.
|
||||
|
||||
class Fai < Formula
|
||||
desc "Deterministic workflow engine for AI-assisted data " \
|
||||
"processing in regulated environments"
|
||||
homepage "https://flemming.ai"
|
||||
version "0.12.1"
|
||||
license "Apache-2.0"
|
||||
|
||||
# Platform-specific binary URLs + sha256 are filled in per
|
||||
# release. cargo-zigbuild-built linux artefacts come from the
|
||||
# same release; the formula consumes them on Apple Silicon and
|
||||
# Intel macs via stanza selectors.
|
||||
if Hardware::CPU.arm?
|
||||
url "https://git.flemming.ai/fai/platform/releases/download/" \
|
||||
"v#{version}/fai-macos-aarch64"
|
||||
sha256 "REPLACE_WITH_AARCH64_SHA256_FROM_MANIFEST"
|
||||
else
|
||||
url "https://git.flemming.ai/fai/platform/releases/download/" \
|
||||
"v#{version}/fai-macos-x86_64"
|
||||
sha256 "REPLACE_WITH_X86_64_SHA256_FROM_MANIFEST"
|
||||
end
|
||||
|
||||
# Plain binary — no source build needed. We rely on the upstream
|
||||
# CI to have produced + signed it. Notarization is a separate
|
||||
# follow-up.
|
||||
def install
|
||||
bin.install Dir["*"].first => "fai"
|
||||
end
|
||||
|
||||
# `brew test fai` runs this — keeps the formula honest. We don't
|
||||
# start the daemon; we only verify the binary is callable.
|
||||
test do
|
||||
assert_match version.to_s, shell_output("#{bin}/fai --version")
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
The F∆I daemon is not started automatically. After install:
|
||||
|
||||
fai bootstrap # writes ~/.fai/ layout + PATH marker
|
||||
fai daemon start # starts the local hub
|
||||
fai install debug.echo # smoke-test the install path
|
||||
|
||||
For Studio, install separately from
|
||||
https://flemming.ai/get.
|
||||
|
||||
Note: this binary is not yet notarized. macOS Gatekeeper will
|
||||
ask for confirmation on first launch. The notarization step
|
||||
is tracked as the remaining half of system-gap S-16.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue