Skip to content

Drop -Preckon.stage=final from release workflow#48

Merged
ogolberg merged 1 commit intomainfrom
fix-reckon-stage-final
May 6, 2026
Merged

Drop -Preckon.stage=final from release workflow#48
ogolberg merged 1 commit intomainfrom
fix-reckon-stage-final

Conversation

@ogolberg
Copy link
Copy Markdown
Member

@ogolberg ogolberg commented May 6, 2026

Summary

  • Tagging 0.1.0 published as 0.1.1 to Maven Central because the release workflow passed -Preckon.stage=final.
  • With stage set, reckon skips the rebuild branch in Reckoner.reckonTargetVersion that would return the tag's exact version when isClean() && currentVersion.isPresent() && stage == null, and instead computes a target normal via defaultInferredScope=patch — bumping 0.1.0 to 0.1.1.
  • The .kotlin.gitignore change from Fix release workflow: ignore .kotlin and set reckon.stage=final #46 is the real fix for the untracked-file clean-check problem; the -Preckon.stage=final "defense in depth" is counterproductive.

Verification

At tag 0.1.0 with a clean tree:

$ ./gradlew properties 2>&1 | grep -E '^version:|Reckoned'
Reckoned version: 0.1.0
version: 0.1.0

With -Preckon.stage=final (the bug):

$ ./gradlew properties -Preckon.stage=final 2>&1 | grep -E '^version:|Reckoned'
Reckoned version: 0.1.1
version: 0.1.1

Test plan

  • After merge, re-push 0.1.0 (or cut a new tag) and confirm the release workflow publishes the tagged version, not tag+1.

🤖 Generated with Claude Code

The flag was added in #46 as defense-in-depth against reckon's clean
check failing, but it also disables the rebuild branch in
Reckoner.reckonTargetVersion. With stage set, reckon skips the
"isClean() && currentVersion.isPresent() && stage == null" path that
returns the tag's exact version and instead computes a target normal
via defaultInferredScope=patch, bumping 0.1.0 -> 0.1.1. That's why the
0.1.0 tag published as 0.1.1 to Maven Central.

The .kotlin -> .gitignore change from #46 is the actual fix for the
untracked-file clean-check problem. With that in place, the rebuild
branch returns the tagged version cleanly and the flag is no longer
needed.

Verified locally at tag 0.1.0 with a clean tree:
  Reckoned version: 0.1.0

Generated with Claude Code
@ogolberg ogolberg merged commit a1abe73 into main May 6, 2026
1 check passed
@ogolberg ogolberg deleted the fix-reckon-stage-final branch May 6, 2026 14:10
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