Broken upgrade from homebrew #68
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
akinus/corten#68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
when I tried downloading from homebrew, it did not work:
❯ brew update && brew upgrade corten
==> Updating Homebrew...
Already up-to-date.
==> Would upgrade 1 outdated package
akinus/forgejo/corten 0.0.50 -> 0.0.52
==> Do you want to proceed with the upgrade? [y/n]
==> Upgrading 1 outdated package:
akinus/forgejo/corten 0.0.50 -> 0.0.52
==> Fetching downloads for: corten
✘ Bottle corten (0.0.52)
Error: Failed to download resource "corten"
Download failed: https://forge.akinus21.com/akinus/corten/releases/download/v0.0.52/corten-0.0.52.x86_64_linux.bottle.tar.gz
##O#- # curl: (22) The requested URL returned error: 404
==> Upgrading akinus/forgejo/corten
0.0.50 -> 0.0.52
==> Pouring corten-0.0.52.x86_64_linux.bottle.tar.gz
Error: No such file or directory @ rb_sysopen - /var/home/gabriel/.cache/Homebrew/downloads/c4274ea269550730df92787fd1b5dbe7db9eab8ba0dd2d72150a1c84a31e2e06--corten-0.0.52.x86_64_linux.bottle.tar.gz
It's clear to me right off the bat, that the version in the brew formula is wrong (our version is 0.0.55, the version in the formula is 0.0.52)
Thanks for reporting. I'm investigating why the Homebrew formula wasn't updated.
Question: Is the
BREW_TAP_ENABLEDvariable set totruein your Forgejo repository settings (Settings → Actions → Variables)?The CI workflow should automatically update the Homebrew formula when this variable is enabled, but if it's not set, the update step silently skips.
@forgejo_bot
BREW_TAP_ENABLED is set to true. The issue must be in the workflow.
I found the issue. The Homebrew formula still points to v0.0.52, not the current v0.0.55.
What I see:
corten-0.0.52.x86_64.bottle.tar.gz(missing_linuxsuffix)corten-0.0.55.x86_64_linux.bottle.tar.gzhttps://forge.akinus21.com/akinus/corten/releases/download/v0.0.52/cortenThis means the "Update homebrew formula" step is not working. The formula was never updated after v0.0.52.
Let me investigate the workflow step.
Found the bug! The workflow YAML had invalid syntax on line 198:
GHA expressions don't support
.replace()method calls. I fixed it using bash parameter expansion:This bug was causing the entire workflow to fail parsing, so no releases were being created since v0.0.52. I've pushed the fix. Once verify passes on devops, a new release will be created that properly updates the Homebrew formula.
I've pushed the fix to main (commit
2c4785e), but the workflow doesn't seem to have triggered. This might be because:Can you check in Forgejo:
Or you can manually trigger it from: Repository → Actions → Select workflow → Run workflow
The push to main did not trigger the workflow. Can you manually trigger it?
Go to: Repository -> Actions -> Pipeline -> Run workflow -> Select main branch
Or push an empty commit to main:
git checkout main
git commit --allow-empty -m "trigger CI"
git push origin main
The fix worked! The Homebrew formula has been updated to v0.0.56.
Root cause: The workflow YAML had invalid syntax with
.replace()method call in GHA expression, which caused the entire workflow to fail parsing. This broke the release pipeline since v0.0.52.Fix applied: Changed
${{ env.GITHUB_SERVER_URL.replace(...) }}to bash parameter expansion${GITHUB_SERVER_URL#https://}.Please try
brew upgrade cortenagain - it should now work with v0.0.56.