docs/ci: zag is public, drop token handling from the formula, installer and README
CI / test (push) Successful in 3m23s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel SamsonandClaude Sonnet 5.5 committed 2026-10-17 14:37:33 +01:00
1 parent 24c7a2804d
commit 4db6b7b1b3
3 files changed
+8 -25

No files matched your search

+4 -15
View File
@@ -9,17 +9,6 @@ base="https://gitea.samson.media/samson-media/zag/releases/download/v$version"
cat <<RUBY
# Generated by zag's release workflow (.github/ci/render-formula.sh); do not edit by hand.
#
# The zag repository is private, so downloads send a Gitea access token. Set it before installing:
# export HOMEBREW_GITEA_TOKEN=<token with read access to samson-media/zag>
class GiteaPrivateReleaseStrategy < CurlDownloadStrategy
def _fetch(url:, resolved_url:, timeout:)
token = ENV["HOMEBREW_GITEA_TOKEN"]
odie "Set HOMEBREW_GITEA_TOKEN to a Gitea access token that can read samson-media/zag" if token.to_s.empty?
curl_download resolved_url, "--header", "Authorization: token #{token}", to: temporary_path, timeout: timeout
end
end
class Zag < Formula
desc "Cross-platform job daemon for long-running FFmpeg and WebDAV media jobs"
homepage "https://gitea.samson.media/samson-media/zag"
@@ -27,22 +16,22 @@ class Zag < Formula
on_macos do
on_arm do
url "$base/zag-macos-arm64", using: GiteaPrivateReleaseStrategy
url "$base/zag-macos-arm64"
sha256 "$(sha macos-arm64)"
end
on_intel do
url "$base/zag-macos-x64", using: GiteaPrivateReleaseStrategy
url "$base/zag-macos-x64"
sha256 "$(sha macos-x64)"
end
end
on_linux do
on_arm do
url "$base/zag-linux-arm64", using: GiteaPrivateReleaseStrategy
url "$base/zag-linux-arm64"
sha256 "$(sha linux-arm64)"
end
on_intel do
url "$base/zag-linux-x64", using: GiteaPrivateReleaseStrategy
url "$base/zag-linux-x64"
sha256 "$(sha linux-x64)"
end
end
+2 -5
View File
@@ -58,12 +58,10 @@ a low idle memory footprint, and easy cross-compilation to every supported platf
### Linux / macOS
The installer downloads the latest release, installs the binary and registers a service
(systemd on Linux, launchd on macOS). The repository is private, so provide an access token:
(systemd on Linux, launchd on macOS):
```bash
export ZAG_TOKEN=<gitea access token>
curl -fsSL -H "Authorization: token $ZAG_TOKEN" \
https://gitea.samson.media/samson-media/zag/raw/branch/main/install.sh | sh
curl -fsSL https://gitea.samson.media/samson-media/zag/raw/branch/main/install.sh | sh
```
`ZAG_VERSION`, `ZAG_PREFIX` and `ZAG_NO_SERVICE=1` tune the install; see the header of `install.sh`.
@@ -72,7 +70,6 @@ curl -fsSL -H "Authorization: token $ZAG_TOKEN" \
```bash
brew tap samson-media/tap https://gitea.samson.media/samson-media/homebrew-tap
export HOMEBREW_GITEA_TOKEN=<gitea access token that can read this repository>
brew install zag
brew services start zag
```
+2 -5
View File
@@ -5,7 +5,6 @@
#
# Environment:
# ZAG_VERSION release tag to install (default: latest)
# ZAG_TOKEN Gitea access token (the repository is private)
# ZAG_PREFIX install directory (default: /usr/local/bin as root, ~/.local/bin otherwise)
# ZAG_NO_SERVICE=1 skip `zag service install`
set -eu
@@ -27,17 +26,15 @@ case "$(uname -m)" in
*) die "unsupported architecture: $(uname -m)" ;;
esac
auth=""
[ -n "${ZAG_TOKEN:-}" ] && auth="Authorization: token $ZAG_TOKEN"
fetch() { # fetch <url> <output>
if [ -n "$auth" ]; then curl -fsSL -H "$auth" -o "$2" "$1"; else curl -fsSL -o "$2" "$1"; fi
curl -fsSL -o "$2" "$1"
}
version="${ZAG_VERSION:-}"
if [ -z "$version" ]; then
info "Looking up the latest release"
tmp_json=$(mktemp)
fetch "$BASE/api/v1/repos/$REPO/releases/latest" "$tmp_json" || die "could not query releases (is ZAG_TOKEN set?)"
fetch "$BASE/api/v1/repos/$REPO/releases/latest" "$tmp_json" || die "could not query releases"
version=$(sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$tmp_json" | head -1)
rm -f "$tmp_json"
[ -n "$version" ] || die "could not determine the latest version"