Skip to content

Commit

Permalink
fix auto-versioning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolij committed Aug 20, 2024
1 parent 4f51580 commit 4fb671d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ if (releaseChannel.suffix != null) {
patchAndSuffix += "."

val maxBuild = patchHistory
.mapNotNull { it.removePrefix(patchAndSuffix).toIntOrNull() }
.filter { it.startsWith(patchAndSuffix) }
.mapNotNull { it.substring(patchAndSuffix.length).toIntOrNull() }
.maxOrNull()

val build = (maxBuild?.plus(releaseIncrement)) ?: 1
Expand Down

0 comments on commit 4fb671d

Please sign in to comment.