fix(autoversion): handle empty CI_COMMIT_TAG by ignoring it
This commit is contained in:
parent
b18e8d2a5c
commit
5583d335d1
@ -7,7 +7,7 @@ val isRelease = project.hasProperty("release")
|
||||
val specialCaseBuilds = setOf("forge", "fabric", "neoforge")
|
||||
fun List<Tag>.filter(): Pair<Tag, Tag?>? {
|
||||
if (isEmpty()) return null
|
||||
val envName = System.getenv("CI_COMMIT_TAG")
|
||||
val envName = System.getenv("CI_COMMIT_TAG")?.ifEmpty { null }
|
||||
val current = envName?.let { v -> indexOfFirst { it.name == v } } ?: 0
|
||||
if (current == -1) throw IllegalStateException("Current tag ($envName) not found in tag list")
|
||||
if (size == current) return get(current) to null
|
||||
|
Loading…
Reference in New Issue
Block a user