From 4db6b7b1b3decca7e2966f6c0ef974ca588dc860 Mon Sep 17 00:00:00 2001 From: Daniel Samson Date: Sat, 17 Oct 2026 14:37:33 +0100 Subject: [PATCH] docs/ci: zag is public, drop token handling from the formula, installer and README Co-Authored-By: Claude Sonnet 5.5 --- .github/ci/render-formula.sh | 19 ++++--------------- README.md | 7 ++----- install.sh | 7 ++----- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/ci/render-formula.sh b/.github/ci/render-formula.sh index fc2d01f..9f3076a 100755 --- a/.github/ci/render-formula.sh +++ b/.github/ci/render-formula.sh @@ -9,17 +9,6 @@ base="https://gitea.samson.media/samson-media/zag/releases/download/v$version" cat < -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 diff --git a/README.md b/README.md index b2b5098..f9ba315 100644 --- a/README.md +++ b/README.md @@ -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= -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= brew install zag brew services start zag ``` diff --git a/install.sh b/install.sh index 7abcdbe..c5e18b3 100755 --- a/install.sh +++ b/install.sh @@ -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 - 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"