Skip to content

Commit

Permalink
chore: fix modrinth release if minVersion == maxVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
chrrs committed Jun 19, 2024
1 parent e4ccae2 commit 5ab2f84
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,18 @@ publishMods {
projectId.set(prop("modrinth", "id"))
accessToken.set(providers.environmentVariable("MODRINTH_TOKEN"))

minecraftVersionRange {
start = prop("minecraft", "minVersion")
end = prop("minecraft", "maxVersion")
val min = prop("minecraft", "minVersion")
val max = prop("minecraft", "maxVersion")

// minecraftVersionRange errors out if min == max,
// so we handle this case separately.
if (min == max) {
minecraftVersions.add(max)
} else {
minecraftVersionRange {
start = prop("minecraft", "minVersion")
end = prop("minecraft", "maxVersion")
}
}
}
}

0 comments on commit 5ab2f84

Please sign in to comment.