Skip to content

Track the newest tag: @* in install snippets and bb-dev release - #24

Merged
matthewdias merged 2 commits into
mainfrom
fix-readme-install-snippets-thr_nn8gwkpaca
Oct 5, 2026
Merged

matthewdias merged 2 commits into
mainfrom
fix-readme-install-snippets-thr_nn8gwkpaca

Conversation

@matthewdias

@matthewdias matthewdias commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Problem

bb 0.45 rejects every install snippet in the root and plugin READMEs:

$ bb plugin install "git:https://github.com/matthewdias/bb-plugins.git@semver:*" \
    --subdirectory plugins/follow-up --tag-prefix follow-up/
Error: Use --tag-prefix or an explicit "semver:" spec, not both.

The CLI turns --tag-prefix P with @R into @semver:P:R, so a ref that is already semver:… is refused.

scripts/bb-dev.mjs release avoided that error by pinning ^<manifest version>. On 0.x, ^0.7.0 can't reach 0.8.0, so bb plugin update stopped following the plugin. And if the checkout's version had no tag yet, the install failed after remove, leaving the plugin uninstalled.

Fix

Use a bare range: @* with --tag-prefix <id>/. The server lists refs/tags/<id>/v*, keeps tags whose version satisfies *, drops pre-releases and picks the newest.

Install snippets (1e7e4f6)

  • README.md and the four plugin READMEs: all 8 snippets now use @*, and the explanation says "the range *".
  • CONTRIBUTING.md: the release note now says to write the bare range and warns against @semver:* with --tag-prefix.

bb-dev.mjs release (6fdd5a8)

  • Installs @* instead of ^X.Y.Z.
  • Checks that every target's <id>/v<version> tag exists on the remote before removing anything. If one is missing, it refuses and changes nothing, so release all can't stop halfway. Without this check, @* would quietly install the previous release.
  • After installing, prints the resolved tag. It adds a note if that tag differs from the checkout's version (possible either way: @* skips pre-releases) or if it couldn't be read.
  • CONTRIBUTING.md: one sentence on both behaviours.

Verification (bb 0.45.0)

Snippets. I ran these against the installed plugins. The server resolves the tag before it checks for an existing install, so the outcomes show how far each form gets:

Form Result
@semver:* + --tag-prefix (old README) not both: rejected by the CLI
@^9.0.0 + --tag-prefix (control) no tag … matches ^9.0.0 (looking for tags named "follow-up/vX.Y.Z")
@* + --tag-prefix, all four plugins resolves the tag, then already installed … remove it first
@semver:follow-up/:*, no flag same as @*

Release script. I ran it against a stand-in bb that records remove/install without running them; the read-only calls went to the real bb:

Case Result
Version tagged (follow-up/v0.7.0) removes, then installs with @*; prints the resolved tag
0.8.0 (no tag) refused, exit 1, no remove or install
release all with that one untagged refused, nothing removed for any plugin
0.8.0-beta.1 (no tag) refused, no remove or install
0.6.0 (a different tag resolves) installs, then notes "a different tag was installed"
bb plugin source unreadable installs, then notes "could not read which tag was installed"
Tag check removed (mutation) the 0.8.0 case removes and installs, so the test catches the check's absence

bb plugin source was unchanged afterwards for all four plugins.

🤖 Generated with Claude Code

matthewdias and others added 2 commits October 5, 2026 08:39
bb 0.45 rejects an explicit "semver:" spec alongside --tag-prefix ("Use
--tag-prefix or an explicit "semver:" spec, not both"), so every README
install line failed. The CLI rewrites --tag-prefix P with @r into
@semver:P:R, so a bare @* resolves to the newest stable P vX.Y.Z tag and
still never goes stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release pinned ^<manifest version>, which on 0.x cannot reach the next minor,
so bb plugin update stopped following the plugin. It now installs @* with
--tag-prefix, which tracks the newest stable tag.

@* resolves whether or not the checkout's own version is tagged, so release
checks every target's <id>/vX.Y.Z on the remote before removing anything and
refuses if one is missing (previously that case failed after remove, leaving
the plugin uninstalled). Afterwards it reports the resolved tag, and notes
when it differs from the checkout's or cannot be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewdias matthewdias changed the title Install snippets: use @* with --tag-prefix, not @semver:* Track the newest tag: @* in install snippets and bb-dev release Oct 5, 2026
@matthewdias
matthewdias merged commit cb25f4c into main Oct 5, 2026
1 check passed
@matthewdias
matthewdias deleted the fix-readme-install-snippets-thr_nn8gwkpaca branch October 5, 2026 15:07
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