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"