From 4056801208c93eab202e47a5697ae8660ddd24ab Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 20 Oct 2026 12:07:39 +0200 Subject: [PATCH] fixup! release-homebrew: add a hand-run script to replace the workflow The v2.56.0.vfs.0.2 cask update had the correct version and checksum but still referenced a universal package instead of the selected macos-arm64 asset, requiring manual correction. Keep the cask's download URL and installer filename aligned with that asset to avoid repeating the problem discussed in https://github.com/microsoft/homebrew-git/pull/112#discussion_r4323488351 Assisted-by: GPT-6.1 Sol Signed-off-by: Johannes Schindelin --- .github/release-homebrew.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/release-homebrew.sh b/.github/release-homebrew.sh index 4a28c4a6bf73bb..af78ecafbfb722 100755 --- a/.github/release-homebrew.sh +++ b/.github/release-homebrew.sh @@ -92,6 +92,8 @@ asset_json=$(jq -n \ ([$matches[].name] | join(", "))) else $matches[0] end') +asset_name=$(jq -n -r --argjson a "$asset_json" '$a.name') +asset_url=$(jq -n -r --argjson a "$asset_json" '$a.browser_download_url') digest=$(jq -n -r --argjson a "$asset_json" '$a.digest // ""') case "$digest" in sha256:*) sha256=${digest#sha256:} ;; @@ -107,7 +109,7 @@ esac test ${#sha256} -eq 64 || die "asset digest is not 64 chars long: $sha256" -echo "==> Asset: $(jq -n -r --argjson a "$asset_json" '$a.name')" +echo "==> Asset: $asset_name" echo "==> SHA-256: $sha256" workdir=$(mktemp -d) @@ -130,6 +132,8 @@ q='(['\''"])[^'\''"]+\2' sed -E \ -e "s/^([[:space:]]*)version +$q/\\1version \\2$version\\2/" \ -e "s/^([[:space:]]*)sha256 +$q/\\1sha256 \\2$sha256\\2/" \ + -e "s|^([[:space:]]*)url +$q|\\1url \\2$asset_url\\2|" \ + -e "s|^([[:space:]]*)pkg +$q|\\1pkg \\2$asset_name\\2|" \ <"$f" >"$f.new" && mv -f "$f.new" "$f"