From 7bc6c6031a3636fa41ddfa7dd6c2fee86a43316e Mon Sep 17 00:00:00 2001 From: Manfred Endres <2523575+Larusso@users.noreply.github.com> Date: Wed, 19 Dec 2018 08:40:02 +0000 Subject: [PATCH] Fix semver v2 snapshot strategy (#46) Description =========== The new semver v2 snapshot strategy doesn't get applied when the current stage == `SNAPSHOT`. Since we want to have backwards compatibility to switch from v1 to v2 this must be fixed Changes ======= * ![FIX] semver v2 snapshot strategy --- .../gradle/release/version/semver2/VersionStrategies.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/wooga/gradle/release/version/semver2/VersionStrategies.groovy b/src/main/groovy/wooga/gradle/release/version/semver2/VersionStrategies.groovy index c711ebb..bf904ea 100644 --- a/src/main/groovy/wooga/gradle/release/version/semver2/VersionStrategies.groovy +++ b/src/main/groovy/wooga/gradle/release/version/semver2/VersionStrategies.groovy @@ -201,7 +201,7 @@ final class VersionStrategies { */ static final SemVerStrategy SNAPSHOT = DEFAULT.copyWith( name: 'snapshot', - stages: ['ci', 'snapshot'] as SortedSet, + stages: ['ci', 'snapshot', 'SNAPSHOT'] as SortedSet, allowDirtyRepo: true, createTag: false, preReleaseStrategy: all(PreRelease.STAGE_BRANCH_NAME, Strategies.PreRelease.COUNT_COMMITS_SINCE_ANY)