File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,17 +311,14 @@ jobs:
311311 echo "==> Fetching current formula"
312312 gh api "repos/${TAP_REPO}/contents/Formula/sx.rb" --jq '.content' | base64 -d > /tmp/formula.rb
313313
314- # Update formula
314+ # Update formula (version is auto-extracted from URL by Homebrew)
315315 echo "==> Updating formula"
316316
317- # Update version
318- sed -i -E "s|version \"[^\"]+\"|version \" ${VERSION}\" |" /tmp/formula.rb
317+ # Update ARM64 URL
318+ sed -i "s|releases/download/v[^/]*/sx-[^-]*-aarch64|releases/download/v ${VERSION}/sx-${VERSION}-aarch64 |" /tmp/formula.rb
319319
320- # Update ARM64 URL and SHA256 (in on_arm block)
321- sed -i -E "s|url \"https://github.com/${REPO}/releases/download/v[^/]+/sx-[^-]+-aarch64-apple-darwin\.tar\.gz\"|url \"${ARM64_URL}\"|" /tmp/formula.rb
322-
323- # Update x86_64 URL and SHA256 (in on_intel block)
324- sed -i -E "s|url \"https://github.com/${REPO}/releases/download/v[^/]+/sx-[^-]+-x86_64-apple-darwin\.tar\.gz\"|url \"${X86_64_URL}\"|" /tmp/formula.rb
320+ # Update x86_64 URL
321+ sed -i "s|releases/download/v[^/]*/sx-[^-]*-x86_64|releases/download/v${VERSION}/sx-${VERSION}-x86_64|" /tmp/formula.rb
325322
326323 # Update SHA256 values - ARM64 first (appears first in file), then x86_64
327324 # Use awk to update sha256 values in order of appearance
You can’t perform that action at this time.
0 commit comments