diff --git a/.dev/githooks/commit-msg b/.dev/githooks/commit-msg index 97bb9764..9ae538aa 100755 --- a/.dev/githooks/commit-msg +++ b/.dev/githooks/commit-msg @@ -9,7 +9,7 @@ do test -z "$a" || [[ "$a" == \#* ]] || scopes+="$a|"; done; scopes="${scopes%\|})" -cat "$1" | grep -Eq "(fix|feat|docs|style|refactor|test|chore|rework|release)(\($scopes\))?: [a-z]" +cat "$1" | grep -Eq "(fix|feat|docs|style|refactor|test|chore|rework|release)(\($scopes\))?: [0-9a-z]" result=$? if test $result -ne 0 then echo "Please check that the commit message adheres to the guidelines at http://karma-runner.github.io/latest/dev/git-commit-msg.html and the scope is one of $scopes as defined in $scopes_file" diff --git a/build.gradle.kts b/build.gradle.kts index 3dd311a5..65e97339 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,8 @@ import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +val versionNumber = "21.1.0" + val minJavaVersion = JavaVersion.VERSION_11 plugins { // Declared twice because plugins block has its own scope @@ -19,7 +21,7 @@ plugins { } group = "sc.gui" -version = "21.0.8" +version = versionNumber try { // Add hash suffix if git is available version = version.toString() + "-" + Runtime.getRuntime().exec(arrayOf("git", "rev-parse", "--short", "--verify", "HEAD")).inputStream.reader().readText().trim() @@ -88,10 +90,10 @@ tasks { val release by creating { group = "distribution" - description = "Creates and pushes a tagged commit" + description = "Creates and pushes a tagged commit with the current version" doLast { - exec { commandLine("git", "commit", "-a", "-m", "release: $version") } - exec { commandLine("git", "tag", "-a", version) } + exec { commandLine("git", "commit", "-a", "-m", "release: $versionNumber") } + exec { commandLine("git", "tag", versionNumber) } exec { commandLine("git", "push", "--follow-tags") } } }