Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Homebrew bottles for this tap #12

Open
2 of 5 tasks
mislav opened this issue Jan 10, 2025 · 0 comments
Open
2 of 5 tasks

Publish Homebrew bottles for this tap #12

mislav opened this issue Jan 10, 2025 · 0 comments

Comments

@mislav
Copy link
Member

mislav commented Jan 10, 2025

I've taken a stab at publishing Homebrew bottles for formula in this repo: rbenv/tap/[email protected] and rbenv/tap/[email protected]

On macOS Sequoia 15 arm64, running brew install for any of these formulae should install "bottles" from this organization, which are basically pre-built packages for a certain OS & architecture.

What follows are some of my notes on how this is done.

Important

If you were getting errors such as these in the last 24 hours:

Error: [email protected]: Failed to download resource "[email protected]"
Download failed: https://ghcr.io/v2/rbenv/tap/openssl/1.1/blobs/sha256:***

that was because I've messed things up in the process, but it should be fixed now. If you're still getting those errors consistently, please comment here or open a new issue. 🙏

How I did it

First off, my local environment:

export HOMEBREW_DEVELOPER=1
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_FROM_API=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_GITHUB_PACKAGES_USER="mislav"
export HOMEBREW_GITHUB_PACKAGES_TOKEN="***"

The steps:

  1. brew uninstall [email protected] [email protected]
  2. brew install --build-bottle rbenv/tap/[email protected]
  3. brew install --build-bottle rbenv/tap/[email protected]
  4. brew bottle --json rbenv/tap/[email protected] --root-url="https://ghcr.io/v2/rbenv/tap"
  5. brew bottle --json rbenv/tap/[email protected] --root-url="https://ghcr.io/v2/rbenv/tap"
  6. brew pr-upload --root-url="https://ghcr.io/v2/rbenv/tap"
  7. Manually edit the bottle ... section in formula files to declare root_url "https://ghcr.io/v2/rbenv/tap"
  8. git push

Notes:

  • brew bottle produces a *.tar.gz package and a *.bottle.json
  • brew pr-upload takes all *.bottle.json files, edits the local formulae to add the bottle ... section to them, and uploads the tarballs to GitHub Packages using HOMEBREW_GITHUB_PACKAGES_TOKEN

See:

TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant