From 561a241e09b08612126238e15bae4fb6ea98e703 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Sat, 31 Oct 2026 18:35:55 -0500 Subject: [PATCH] build: render the tap formula against any tag pin The tap job matched the literal v0.1.0 url line, so bumping the pin broke the release render. The pin is now matched generically and marked in-source as a placeholder the workflow rewrites; the tap always ships the release tarball with its real sha256. --- .github/workflows/release.yml | 3 +-- packaging/homebrew/Formula/ecrou.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 841cfb9..40e9028 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -132,8 +132,7 @@ jobs: sha="$(cut -d' ' -f1 "dist/ecrou-v$v-darwin-arm64.tar.gz.sha256")" url="https://github.com/vhaudiquet/ecrou/archive/refs/tags/v$v.tar.gz" mkdir -p formula/Formula - sed -e 's|^ # Pinned by tag until the first release exists; switch to the$| # Published by the ecrou release workflow; do not edit by hand.|' -e '/^ # release tarball + sha256 then\.$/d' -e "s|^ url \"https://github.com/vhaudiquet/ecrou.git\", tag: \"v0.1.0\"$| url \"$url\"\n sha256 \"$sha\"|" \ - packaging/homebrew/Formula/ecrou.rb > formula/Formula/ecrou.rb + sed -e '/^ # Placeholder pin:/d' -e "s|^ url \"https://github.com/vhaudiquet/ecrou.git\", tag: \"v[0-9][0-9.]*\"$| url \"$url\"\n sha256 \"$sha\"|" packaging/homebrew/Formula/ecrou.rb > formula/Formula/ecrou.rb grep -q "sha256 \"$sha\"" formula/Formula/ecrou.rb git clone -q "https://x-access-token:$TAP_TOKEN@github.com/vhaudiquet/homebrew-ecrou" tap cp formula/Formula/ecrou.rb tap/Formula/ecrou.rb diff --git a/packaging/homebrew/Formula/ecrou.rb b/packaging/homebrew/Formula/ecrou.rb index 93d78f8..93b1998 100644 --- a/packaging/homebrew/Formula/ecrou.rb +++ b/packaging/homebrew/Formula/ecrou.rb @@ -5,8 +5,7 @@ class Ecrou < Formula desc "a small microVM runtime based on libkrun" homepage "https://github.com/vhaudiquet/ecrou" - # Pinned by tag until the first release exists; switch to the - # release tarball + sha256 then. + # Placeholder pin: the release workflow rewrites url and sha256 on publish. url "https://github.com/vhaudiquet/ecrou.git", tag: "v0.1.0" license "MIT"