Skip to content

fix: bumpSnapshot increments patch instead of minor version - #183

Merged
pando85 merged 5 commits into
mainfrom
fix/bumpsnapshot-patch-version
Sep 23, 2026
Merged

pando85 merged 5 commits into
mainfrom
fix/bumpsnapshot-patch-version

Conversation

@forkline-bot

@forkline-bot forkline-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Problem

The bumpSnapshot gradle task was calling version.nextMinorVersion("SNAPSHOT"), which caused every release cycle to jump a minor version (e.g., 1.23.0 → 1.24.0-SNAPSHOT → 1.24.0 → 1.25.0-SNAPSHOT).

Fix

Changed bumpSnapshot to use version.nextPatchVersion("SNAPSHOT") so the version increments the patch component instead (e.g., 1.23.0 → 1.23.1-SNAPSHOT → 1.23.1 → 1.23.2-SNAPSHOT).


This PR was generated by Forkline — AI-powered code contributions.
The agent analyzed the issue and implemented this fix autonomously.

@forkline-bot

forkline-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Author

Maintainability Review

  • Initial expected implementation: matched
  • Initial reason: PR description specifies changing bumpSnapshot from nextMinorVersion("SNAPSHOT") to nextPatchVersion("SNAPSHOT"). Code at VersioningPlugin.kt:83 uses version.nextPatchVersion("SNAPSHOT") and the task description at line 82 correctly says "Increment the patch version and add the SNAPSHOT suffix".
  • Applied maintenance work: none
  • Final implementation: matches
  • Validation: Reviewed all versioning code, release workflow, auto-tag workflow, deploy-snapshot script, and release skill documentation for consistency.

Findings

Priority: low
Category: test
Decision: do not pursue
Location: build-logic/src/main/kotlin/app/passwordstore/gradle/versioning/
Problem: No unit tests exist for VersioningPlugin or VersioningTask.
Action: No tests added.
Why it is worth it: Would protect against future regressions in version arithmetic.
Risk / scope: Adding a Gradle test harness for this plugin is disproportionate for a one-line task definition change. Pre-existing gap, not introduced by this PR.

@pando85

pando85 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

@forkline why not choose in the release skill if it has to be major, minor or patch.

@forkline-bot forkline-bot Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. bumpSnapshot now accepts -PbumpType=major|minor|patch (defaults to patch). The release skill's Step 8 has been updated to prompt for the bump type when starting the next development cycle.

Usage:

./gradlew :app:bumpSnapshot -PbumpType=minor

@pando85

pando85 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

@forkline but it is better to choose it when we are going to release. We don't have to prepare next release cycle after releasing.

@forkline-bot

forkline-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Author

Updated the release skill to move the bump type decision (major/minor/patch) into the release step itself. The next snapshot version is now prepared immediately after pushing the release, not as a separate later step.

@forkline-bot forkline-bot Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the release skill to choose the bump type (major/minor/patch) at release time. The next snapshot is now prepared immediately after pushing the release commit, eliminating the need for a separate "prepare next release cycle" step later.

@pando85

pando85 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

@forkline how could we rework that skill to remove step 8. It just to happen before releasing

@forkline-bot forkline-bot Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged step 8 into step 7. The release skill now has 7 steps instead of 8, with the snapshot bump happening as part of the post-release monitoring flow rather than as a separate step.

@pando85

pando85 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

@forkline I will try to explain my self better: you should not prepare next release cycle. When you release, at the beginning, you choose the version and prepare the release. Then, you do nothing, not prepare or do nothing more.

@forkline-bot forkline-bot Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the release workflow to remove post-release snapshot preparation. The release skill, RELEASE.md, and setup-android-release skill now follow this flow:

  1. At release time: choose bump type (major/minor/patch) and bump the version directly
  2. Commit, push, monitor CI
  3. Done — no snapshot bumping after release

The version stays at the release value until the next release is cut.

@pando85
pando85 merged commit 35d9f2a into main Sep 23, 2026
5 checks passed
@pando85
pando85 deleted the fix/bumpsnapshot-patch-version branch September 23, 2026 17:00
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