Skip to content

Commit

Permalink
Add dirty flag to version even in tagged commits
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Jun 15, 2022
1 parent 91eb1b1 commit 67971b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
if (grgit != null) {
var dirty = grgit.status().clean ? "" : "-dirty"
if (grgit.describe(tags: true) == "${project.mod_version}+mc${project.minecraft_version}") {
version = "${project.mod_version}+mc${project.minecraft_version}"
version = "${project.mod_version}+mc${project.minecraft_version}${dirty}"
} else {
var dirty = grgit.status().clean ? "" : "-dirty";
version = "${project.mod_version}-dev.${grgit.head().abbreviatedId}+mc${project.minecraft_version}${dirty}"
}
} else {
Expand Down

0 comments on commit 67971b0

Please sign in to comment.