Skip to content

Publish interim versions between releases - #42

Merged
norman-abramovitz merged 2 commits into
masterfrom
repo-interim-target
Jul 30, 2026
Merged

Publish interim versions between releases#42
norman-abramovitz merged 2 commits into
masterfrom
repo-interim-target

Conversation

@norman-abramovitz

Copy link
Copy Markdown
Contributor

Addresses the repo_interim criterion in #39:

To enable collaborative review, the project's source repository MUST include
interim versions for review between releases; it MUST NOT include only final
releases.

What was actually wrong

The mechanism already existed — bump.mk has had prerelease labels all along —
but it produced an unusable result. Applying a label to a final version gave:

v1.23.0 + make bump dev  ->  v1.23.0-dev.1

Semver orders a prerelease before its own release, so that interim version
is older than the release it follows. No resolver would select it, and the
failure is silent: the tag is created and simply ignored.

Fixed upstream, not worked around here

The first attempt at this was a local make interim wrapper. That was the
wrong shape — it papered over a defect every repo vendoring the snippet
inherits. Fixed in GNUMakefile-Snippets
(PR #4)
and re-vendored here instead.

The core now advances before the label is applied, by BUMP_PRERELEASE_STEP.
Its default is minor, which matches this project's cadence (1.20 → 1.21 →
1.22 → 1.23), so no override is needed:

make bump dev                              # v1.23.0 -> v1.24.0-dev.1
git push origin refs/tags/v1.24.0-dev.1
make bump dev                              # -dev.1  -> -dev.2
make bump final                            # -dev.2  -> v1.24.0

Counter advances and label switches are unaffected — they already target a core
ahead of the last release.

Scope

  • mk/bump.mk re-vendored — this file only. go-release.mk, version.mk
    and changelog.mk have also drifted behind upstream (they gained
    TAG_PREFIX, v- parsing, and changelog-deps targets). Those are
    independent improvements and are deliberately left for their own PR.
  • CONTRIBUTING.md documents the practice, which is what the badge criterion
    needs to point at — a target that merely exists proves nothing.

Also carries the changelog.d sweep for the fragment v1.23.0 consumed.

Verification

make check clean. make bump dev DRYRUN=yes in this repo resolves
v1.23.0 -> v1.24.0-dev.1. The upstream PR carries the full behaviour matrix,
including that bump major/minor/patch/final are unchanged.

OpenSSF Best Practices repo_interim asks that reviewers have versions to
look at between releases, not only final ones. The mechanism already
existed -- bump.mk's prerelease labels -- but produced an unusable
result: applying a label to a final version gave v1.23.0-dev.1, which
semver orders before v1.23.0, so the interim version was older than the
release it followed and no resolver would select it.

Fixed upstream in the snippets rather than worked around here, so every
repo vendoring bump.mk gets it. The core now advances first, by
BUMP_PRERELEASE_STEP; the default of minor matches this project's
cadence, so no override is needed.

  make bump dev     v1.23.0 -> v1.24.0-dev.1
  make bump dev     -dev.1  -> -dev.2
  make bump final   -dev.2  -> v1.24.0

CONTRIBUTING documents the practice, which is what the criterion needs
to point at.
@norman-abramovitz
norman-abramovitz merged commit 577149e into master Jul 30, 2026
6 checks passed
@norman-abramovitz
norman-abramovitz deleted the repo-interim-target branch July 30, 2026 17:21
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