Skip to content

Commit

Permalink
Use Minecraft built with in version string
Browse files Browse the repository at this point in the history
  • Loading branch information
Ampflower committed Sep 22, 2023
1 parent 2f93463 commit cd3c054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ val githubRepository: String by project
val isPublish = System.getenv("GITHUB_EVENT_NAME") == "release"
val isRelease = System.getenv("BUILD_RELEASE").toBoolean()
val isActions = System.getenv("GITHUB_ACTIONS").toBoolean()
val baseVersion = "$projectVersion+mc.${libs.versions.minecraft.required.get()}"
val baseVersion = "$projectVersion+mc.${libs.versions.minecraft.version.get()}"
version = when {
isRelease -> baseVersion
isActions -> "$baseVersion-build.${System.getenv("GITHUB_RUN_NUMBER")}-commit.${System.getenv("GITHUB_SHA").substring(0, 7)}-branch.${System.getenv("GITHUB_REF")?.substring(11)?.replace('/', '.') ?: "unknown"}"
Expand Down

0 comments on commit cd3c054

Please sign in to comment.