diff --git a/build.gradle.kts b/build.gradle.kts index 5d1b576ac..fd6758ecc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -375,12 +375,15 @@ fun loadGit() { git = Grgit.open(mapOf("currentDir" to project.rootDir)) val commit = git.log().first() val tag = git.tag.list().find { it.commit == commit } - val nextVersion = if (tag != null) { + var nextVersion = if (tag != null) { stable = true tag.name } else { commit.abbreviatedId } + if (!git.status().isClean) { + nextVersion += "-dirty" + } if (project.version != nextVersion) { project.version = nextVersion println("Version changed to ${project.version}")