Skip to content

build: bump suffixed plugin versions on upstream releases - #12

Open
wanglongan587 wants to merge 2 commits into
ora-space:mainfrom
wanglongan587:build/422-upstream-suffix-bump
Open

wanglongan587 wants to merge 2 commits into
ora-space:mainfrom
wanglongan587:build/422-upstream-suffix-bump

Conversation

@wanglongan587

Copy link
Copy Markdown
Contributor

Summary

The nightly bump treated a suffixed version as arithmetic on its patch segment: 0.7.0-opencode2.1 became PATCH=0-opencode2.1, and $((PATCH + 1)) failed the whole run before any tag was pushed. This replaces that inline bash with scripts/bump-version.ts, which is tested:

0.6.11            -> 0.6.12            no suffix: the patch moves
0.7.0-opencode2.1 -> 0.7.0-opencode2.2 suffix: its trailing counter moves
0.7.0-opencode2   -> 0.7.0-opencode2.1 no counter yet: start one

A version outside that grammar fails with the version named rather than producing a number nobody chose. The workflow now captures deno task bump-version as the tag, and CI runs deno test scripts/ so the rule stays covered.

The second commit aligns the two package.ts comments the reviewer flagged in #8 with the npm source (digest check only applies to GitHub releases; npm archives are verified by SRI before writing and stage the CLI under package/bin/), and refreshes upstream.yml's description of which upstream it watches. AGENTS.md records the new bump rule and the CI test step.

This PR is only the rule and its comments: it does not bump orax.toml, tag, release, or touch the marketplace.

Refs ora-space/circus#422

ADR status: no ADR is involved. The change is how the nightly release computes this plugin's own version and how two packaging comments describe the existing two upstream sources; no runtime contract, host behavior, or model-access decision changes.

Evidence

  • deno task check, deno task lint, deno test scripts/ (7 tests) pass on the head commit.
  • deno task bump-version against the current manifest prints 0.7.0-opencode2.2 and rewrites only the version line (restored afterwards; the manifest is not part of this PR).
  • The workflow's YAML parses, and the changed run block passes bash -n.
  • deno fmt --check passes on the new script and test.

Merge Danger

Door: two-way

Blast Radius: release workflow

The step still fails closed: an unrecognised version aborts before the commit or tag is made, and the existing tag-collision check is unchanged. Merging changes what the next nightly tag will be for a suffixed main; it cannot change a release that already exists, and no tag is created by this PR.

The nightly bump split the version with bash parameter expansion and
did `$((PATCH + 1))`, so a suffixed version like 0.7.0-opencode2.1 put
`0-opencode2.1` into the arithmetic and failed the whole run before any
tag was pushed.

Move the rule into scripts/bump-version.ts, which is tested: an
unsuffixed version bumps its patch number, a suffixed one bumps the
trailing counter of its suffix (0.7.0-opencode2.1 ->
0.7.0-opencode2.2), and a suffix without a counter starts at .1. A
version the rule cannot describe fails with that version named instead
of producing a number nobody chose. The workflow captures the script's
stdout as the tag and CI runs the script tests.

Also refresh this workflow's own description of what it watches: the
bundle config can name a pinned npm distribution, not only the latest
GitHub release.
package.ts still described the Releases API digest as the integrity
check for every archive and the CLI as the only entry at the archive
root. Both hold for the GitHub-release source only: npm archives are
verified against their SRI before they are written, and place the CLI
under package/bin/. Say which source each comment applies to.
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