Skip to content

Commit

Permalink
ci: don't add -dev version suffix for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
realRobotix committed Sep 26, 2024
1 parent 3c8d6bb commit ac16107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ architectury {
}

boolean ci = System.getenv("CI") != null ? System.getenv("CI").toBoolean() : false
boolean nightly = ci && (System.getenv("RELEASE") != null ? !System.getenv("RELEASE").toBoolean() : true)
boolean release = System.getenv("RELEASE") != null ? System.getenv("RELEASE").toBoolean() : false
boolean nightly = ci && !release

subprojects {
apply plugin: "dev.architectury.loom"
Expand Down Expand Up @@ -51,7 +52,7 @@ subprojects {
}

String buildNumber = System.getenv("GITHUB_RUN_NUMBER")
version = "${mod_version}+mc.${minecraft_version}-${project.name}${nightly ? "-build.${buildNumber}" : ""}"
version = "${mod_version}${release ? "" : "-dev"}+mc.${minecraft_version}-${project.name}${nightly ? "-build.${buildNumber}" : ""}"

publishing {
publications {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.caching=true
# Mod Info
archives_base_name=createbigcannons
group=com.rbasamoyai
mod_version=5.6.0-dev
mod_version=5.6.0
minecraft_version=1.18.2
enabled_platforms=fabric,forge

Expand Down

0 comments on commit ac16107

Please sign in to comment.