File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ def getSnapshotVersion(String version) {
4242 def matcher = version =~ / $prefix(\d +)\. (\d +)\. (\d +.*)/
4343 def major = (matcher[0 ][1 ] as Integer )
4444 def isPreRelease
45+ def patch = 0
4546 try {
46- Integer . parseInt(matcher[0 ][3 ])
47+ patch = Integer . parseInt(matcher[0 ][3 ])
4748 isPreRelease = false
4849 } catch (NumberFormatException ignored) {
4950 isPreRelease = true
@@ -54,9 +55,9 @@ def getSnapshotVersion(String version) {
5455 }
5556 def branch = System . getenv(" CIRCLE_BRANCH" )
5657 if (! branch || branch == " main" || branch ==~ / release-v.*/ ) {
57- return " ${ major} .${ minor} .0 -SNAPSHOT"
58+ return " ${ major} .${ minor} .${ patch } -SNAPSHOT"
5859 } else {
59- return " ${ major} .${ minor} .0 -${ branch} -SNAPSHOT"
60+ return " ${ major} .${ minor} .${ patch } -${ branch} -SNAPSHOT"
6061 }
6162 }
6263}
You can’t perform that action at this time.
0 commit comments