Skip to content

Commit

Permalink
Show how to avoid the double patch bump
Browse files Browse the repository at this point in the history
The `release` task also bumps, a patch one by default.
So just don't use `markNextVersion` within the release process.
It's for manually marking a version for the future.

Show how to avoid atlassian-labs/db-replica#77
  • Loading branch information
dagguh committed Jun 14, 2024
1 parent 32a5808 commit 495121f
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ class ReleaseTest {
project.git.addOrigin(safelyPushableRemote)
project.git.push().call()

val markNextVersion = project.buildTask(
"markNextVersion",
"-Prelease.incrementer=incrementPatch",
"-Prelease.localOnly",
"--stacktrace"
)
assertThat(markNextVersion?.task(":markNextVersion")?.outcome).isEqualTo(SUCCESS)

val release = project.buildTask("release", "--stacktrace")
val release = project.buildTask("release", "-Prelease.incrementer=incrementPatch", "--stacktrace")
assertThat(release?.task(":release")?.outcome).isEqualTo(SUCCESS)

val currentVersion = project.buildTask("currentVersion")
Expand Down

0 comments on commit 495121f

Please sign in to comment.