Skip to content

Add Homebrew support - #894

Merged
MrSkwiggs merged 3 commits into
mainfrom
feat/homebrew
Oct 30, 2026
Merged

MrSkwiggs merged 3 commits into
mainfrom
feat/homebrew

Conversation

@MrSkwiggs

@MrSkwiggs MrSkwiggs commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the pieces Ignite needs to be distributed through a maintainer-owned Homebrew tap. Refs #879.

Why

  • Installing the CLI currently means cloning the repo and running make install. A Homebrew formula makes that a two-line install and gives us a path to prebuilt bottles.
  • homebrew-core already has an unrelated formula called ignite (a Cosmos blockchain tool), so a bare brew install ignite would always pick that one, even with our tap added. The formula is therefore called ignite-swift. The installed command is still ignite.
  • We'd rather ship this from a tap we control than depend on a homebrew-core review, so the formula lives in a separate homebrew-ignite repo.

Changes

ignite run finds its server script reliably

RunCommand used to locate ignite-server.py from argv[0]. That only works when the tool is invoked by path. When ignite is run from PATH, argv[0] is just ignite, so the lookup resolves against the current directory and fails. Homebrew symlinks binaries into its prefix, which makes this the normal case.

The new locateServerScript() checks, in order:

  1. Next to the executable (Bundle.main.executableURL). This is where make install puts it.
  2. Next to the executable with symlinks resolved.
  3. In a sibling libexec/ folder, which is where Homebrew installs support files.

It also tries argv[0] when that contains a slash. Behaviour for make install users is unchanged.

Two smaller fixes in the same function:

  • The script path is now quoted in the shell command, so install prefixes containing spaces work.
  • The "missing script" message also suggests brew reinstall ignite-swift.

Release workflow (.github/workflows/release.yml)

Runs on tags matching [0-9]+.[0-9]+.[0-9]+.

  • release: creates a GitHub Release with generated notes, unless one already exists for the tag. The latest Release today is 0.6.4, so tags since then have none.
  • bump-homebrew-tap: checks out the tap using the HOMEBREW_TAP_TOKEN secret, updates url and sha256 in Formula/ignite-swift.rb, drops the stale bottle do block, pushes ignite-swift-<tag> and opens a PR on the tap. The tap's own CI then builds bottles, and the pr-pull label publishes them. It does nothing if the formula is already at that tag, and fails with a clear error if the secret is missing.
  • Before either job does anything, release checks that the version: string in IgniteCLI.swift equals the tag, and stops if not. ignite --version reads that hard-coded string, and it had drifted from the tags (0.6.9 in code, 0.7.1 tagged). A release now needs a version-bump PR merged first.

README

Adds a Homebrew install section above the build-from-source steps, with a note explaining the ignite-swift name.

Before merging

  • HOMEBREW_TAP_TOKEN secret is set on this repo (fine-grained, limited to the tap, Contents and Pull requests read/write).
  • Tap repo has its initial commit and Formula/ignite-swift.rb, otherwise the first bump PR has nothing to update.
  • Repo references in release.yml and the README point at the tap's current location.

Testing

Not run end to end yet. The first tag after merge will exercise the workflow; the tap's brew test-bot run on the resulting bump PR is the real install check.

@MrSkwiggs MrSkwiggs self-assigned this Oct 30, 2026
ignite --version reads a hard-coded string, which had drifted from the tags (0.6.9 in code, 0.7.1 tagged). The release job now checks the tagged commit and stops before creating a Release or opening a Homebrew bump PR if they differ.
@MrSkwiggs MrSkwiggs mentioned this pull request Oct 30, 2026
@MrSkwiggs
MrSkwiggs merged commit 55b0971 into main Oct 30, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant