Skip to content

ci(release): move stable CLI to homebrew-core and fix tap sync bugs#6416

Merged
houko merged 4 commits into
mainfrom
ci/tap-stable-to-core
Jul 9, 2026
Merged

ci(release): move stable CLI to homebrew-core and fix tap sync bugs#6416
houko merged 4 commits into
mainfrom
ci/tap-stable-to-core

Conversation

@houko

@houko houko commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

LibreFang's stable CLI was accepted into homebrew-core on 2026-07-08 (Homebrew/homebrew-core#290413), so brew install librefang now resolves there.

This retires the tap's duplicate stable CLI formula and — from the review pass — fixes two latent bugs in the tap sync that made brew readall librefang/tap fail.

Changes

Release pipeline — stable → core

  • sync_homebrew job: drop stable from the channel set. A stable tag now cascades the newest build into the beta / rc channels only. The keg-only versioned formula and the sync_homebrew_cask job are unaffected; ALL_CHANNELS stays (stable beta rc) so the beta/rc formulae keep their conflicts_with "librefang" (now the core formula).
  • Release-notes install block: the stable CLI installs directly from homebrew-core; the brew tap line now covers only the pre-release CLI channels and the desktop app.

Release pipeline — bug fixes found during review

  • Invalid versioned-formula class names. CLASS_SUFFIX stripped only . (tr -d '.'), leaving the - in pre-release versions, so [email protected] generated class LibrefangAT2026629-beta14 < Formula — a Ruby syntax error that made every beta/rc pin fail brew readall. Now derived with Homebrew's own Formulary.class_s rules (LibrefangAT2026629Beta14).
  • Multiple cask conflicts_with stanzas. The cask generator emitted one conflicts_with per other channel, but casks allow only one; the librefang-beta / librefang-rc casks were rejected as invalid. Now collected into a single array literal (conflicts_with cask: ["librefang", "librefang-rc"]). Fixed in both release.yml and its release-desktop.yml mirror.

README

  • Expand every install <details> (Homebrew, Arch, Docker, Cloud Deploy) with open so install options render expanded, across all nine READMEs.

Companion change

Tap-side cleanup + the already-published broken artifacts are corrected in librefang/homebrew-tap (librefang/homebrew-tap#6): remove the orphaned stable formula, add tap_migrations.json ("librefang": "homebrew/core"), fix the 40 broken versioned formulae and 2 casks, update the tap README.

Verification

  • python3 -c "import yaml; yaml.safe_load(...)" on both workflows passes; CI runs Actionlint.
  • Mounted the tap PR's file state locally and ran brew readall librefang/tap0 errors (was 70+ before the class-name / cask fixes).
  • brew info librefang/tap/librefang resolves to homebrew-core via tap_migrations.json.
  • No behavior change for -beta / -rc release tags.

Evan added 2 commits July 9, 2026 13:04
The stable CLI was accepted into homebrew-core (Homebrew/homebrew-core#290413), so `brew install librefang` now resolves there. Continuing to generate a stable `librefang` formula in librefang/homebrew-tap shadows the core formula and duplicates maintenance on every release.

Drop `stable` from the sync_homebrew channel set: a stable tag now cascades the newest build into the beta/rc channels only. The keg-only versioned formula (`librefang@<ver>`) is still generated for version pinning, and the cask sync job is untouched (the desktop app is not in core). ALL_CHANNELS stays `(stable beta rc)` so the beta/rc formulae keep their `conflicts_with "librefang"` line, which now points at the core formula.

Also fix the release-notes install block: the stable CLI line no longer sits under `brew tap`, it installs directly from homebrew-core; the tap line now covers only the pre-release CLI channels and the desktop app.

The tap-side cleanup (remove the orphaned stable formula, add tap_migrations.json, update the tap README) lands in librefang/homebrew-tap.
@github-actions github-actions Bot added area/docs Documentation and guides area/ci CI/CD and build tooling size/S 10-49 lines changed no-rust-required This task does not require Rust knowledge labels Jul 9, 2026
Add `open` to every install `<details>` (Homebrew, Arch, Docker, Cloud Deploy) across all nine READMEs so the install options render expanded instead of collapsed.
@github-actions github-actions Bot added size/M 50-249 lines changed and removed size/S 10-49 lines changed labels Jul 9, 2026
… tap sync

Two latent bugs in the Homebrew tap sync surfaced by `brew readall`:

- The version-pinned formula class name stripped only `.` (`tr -d '.'`), leaving the `-` in pre-release versions, so `[email protected]` generated `class LibrefangAT2026629-beta14 < Formula` — a Ruby syntax error. Derive it with Homebrew's own `Formulary.class_s` rules instead (`LibrefangAT2026629Beta14`).
- The cask generator wrote one `conflicts_with` stanza per other channel, but casks allow only one; collect the channels into a single array literal (`conflicts_with cask: ["librefang", "librefang-rc"]`). Fixed in both `release.yml` and its `release-desktop.yml` mirror.

The already-published broken tap artifacts are corrected in librefang/homebrew-tap.
houko added a commit to librefang/homebrew-tap that referenced this pull request Jul 9, 2026
…rtifacts

These were emitted by the release pipeline's tap sync and are corrected upstream in librefang/librefang#6416.

- 40 version-pinned formulae had `class LibrefangAT<ver>-beta<N>` (a Ruby syntax error from leaving the `-` in the class name); regenerate the class names with Homebrew's `Formulary.class_s` rules (e.g. `LibrefangAT2026629Beta14`).
- The `librefang-beta` / `librefang-rc` casks carried two `conflicts_with` stanzas, which casks reject; collapse each into a single array literal.

`brew readall librefang/tap` now passes with zero errors.
@houko houko changed the title ci(release): stop syncing the stable CLI formula to the tap ci(release): move stable CLI to homebrew-core and fix tap sync bugs Jul 9, 2026
@houko
houko merged commit b31634c into main Jul 9, 2026
33 checks passed
@houko
houko deleted the ci/tap-stable-to-core branch July 9, 2026 04:49
houko added a commit to librefang/homebrew-tap that referenced this pull request Jul 9, 2026
* chore: move stable CLI to homebrew-core

LibreFang's stable CLI was accepted into homebrew-core (Homebrew/homebrew-core#290413), so `brew install librefang` now resolves there.

Remove the tap's stable `Formula/librefang.rb` (it shadowed the core formula) and add tap_migrations.json so existing `librefang/tap/librefang` installs migrate to homebrew/core on `brew upgrade`. Update the README to install the stable CLI from core and scope the tap to the desktop app, the pre-release CLI channels, and version pinning.

The desktop cask keeps the name `librefang`; formula and cask names coexist, and the migration entry only redirects the formula token. The beta/rc formulae, all casks, and the keg-only versioned formulae are unchanged.

The release pipeline stops regenerating the stable formula in librefang/librefang#6416.

* chore: fix invalid class names and cask conflicts_with in generated artifacts

These were emitted by the release pipeline's tap sync and are corrected upstream in librefang/librefang#6416.

- 40 version-pinned formulae had `class LibrefangAT<ver>-beta<N>` (a Ruby syntax error from leaving the `-` in the class name); regenerate the class names with Homebrew's `Formulary.class_s` rules (e.g. `LibrefangAT2026629Beta14`).
- The `librefang-beta` / `librefang-rc` casks carried two `conflicts_with` stanzas, which casks reject; collapse each into a single array literal.

`brew readall librefang/tap` now passes with zero errors.
houko added a commit that referenced this pull request Jul 9, 2026
…6418)

* ci(release): match Homebrew class_s casing for versioned tap formula

Follow-up to #6416. The versioned formula class name was derived with `tr -cd '[:alnum:]'`, which fixed the earlier hyphen syntax error but kept the channel word lowercase (`LibrefangAT2026710beta1`). Homebrew's golden_gate audit requires the class name to equal `Formulary.class_s` of the formula name, i.e. the char after each separator is uppercased (`LibrefangAT2026710Beta1`), so the next pre-release tag would have produced a versioned formula that fails `brew readall` / install.

Derive the suffix with a class_s-equivalent transform (drop each separator and uppercase the following char).

Verified by running the real generation step for `v2026.7.10` and `v2026.7.10-beta.1` (with a GNU-sed shim mirroring the ubuntu-latest runner): both taps now pass `brew readall` with zero errors, and the beta versioned formula is `class LibrefangAT2026710Beta1`.

* docs(changelog): note the versioned formula class_s casing fix (#6418)

* ci(release): rewrap versioned-formula class comment to one sentence per line

CLAUDE.md's prose-wrapping rule requires new comment prose to break
only at sentence boundaries, not at a column width.

---------

Co-authored-by: Evan <[email protected]>
Co-authored-by: Claude <[email protected]>
@houko houko mentioned this pull request Jul 10, 2026
houko pushed a commit that referenced this pull request Jul 10, 2026
Rewrap the new cli_pypi guard comments in release.yml and
release-cli.yml to one sentence per line, per CLAUDE.md's
prose-wrapping rule (new prose must break only at sentence
boundaries, not at a fixed column width) — the same fix #6418
applied to a similar release-workflow comment.

Add the missing [Unreleased] CHANGELOG entry for this fix, matching
the established convention of every other CI-only fix PR in this
repo (#6410, #6389, #6416, #6418) recording a changelog line.
houko added a commit that referenced this pull request Jul 10, 2026
…op deleting CLI assets (#6433)

* fix(ci): publish CLI wheels to PyPI only for stable/LTS releases

The `librefang` PyPI project has a 10 GB total-size quota.
Each release uploads ~8 per-platform CLI binary wheels (~250 MB), and because every beta/rc tag published too, 46 accumulated pre-releases consumed 10.35 GB and pushed the project over quota — the v2026.7.10 stable `CLI / PyPI` job then failed with `400 Project size too large`.

Gate the `cli_pypi` job (in both release.yml and the manual release-cli.yml re-run path) to stable and LTS tags only.
A tag is treated as a pre-release when it carries any `-suffix` (e.g. `-beta.10`, `-rc.1`); `-lts` is the sole non-pre-release suffix, matching create_release's existing `-lts` special-casing.
Pre-release CLI binaries are still attached to the GitHub Release, and `librefang-sdk` (a separate PyPI project) is unaffected.

* docs(ci): rewrap cli_pypi gate comments and add CHANGELOG entry

Rewrap the new cli_pypi guard comments in release.yml and
release-cli.yml to one sentence per line, per CLAUDE.md's
prose-wrapping rule (new prose must break only at sentence
boundaries, not at a fixed column width) — the same fix #6418
applied to a similar release-workflow comment.

Add the missing [Unreleased] CHANGELOG entry for this fix, matching
the established convention of every other CI-only fix PR in this
repo (#6410, #6389, #6416, #6418) recording a changelog line.

* fix(ci): stop desktop re-release from deleting CLI binary assets

The desktop job's "Delete existing assets for this target" step matched `*<rust_target>*`, and the cli_* jobs name their uploads `librefang-<rust_target>.tar.gz|.zip` (+ `.sha256`) with the SAME target triple.
So when a desktop job re-ran after its CLI counterpart had already uploaded, it deleted the CLI binary tarball as collateral.
This is why the v2026.7.10 macOS CLI tarballs (`librefang-x86_64-apple-darwin.tar.gz`, `librefang-aarch64-apple-darwin.tar.gz`) disappeared after the desktop macOS jobs re-ran for notarization, which then made the `CLI / PyPI` job fail with a 404 when it tried to download them to build the wheels.

Skip CLI-owned assets (`librefang-*`, `SHA256SUMS*`) before the target-glob delete.
Desktop bundles use Tauri's own naming (`LibreFang_<ver>_<x64|aarch64|amd64|arm64>…`) which never contains the triple, so the guard costs the desktop nothing while protecting the CLI artifacts on every platform.

* docs(changelog): note the desktop asset-cleanup fix (#6433)

---------

Co-authored-by: Evan <[email protected]>
Co-authored-by: Claude <[email protected]>
@houko houko mentioned this pull request Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD and build tooling area/docs Documentation and guides no-rust-required This task does not require Rust knowledge size/M 50-249 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant