Use branch names in version.

This commit is contained in:
Michael Lipp 2023-09-12 11:48:45 +02:00
parent 72beccc8cd
commit ffeaf31534

View file

@ -63,7 +63,12 @@ scmVersion {
tag {
def shortened = project.name.startsWith(project.group + ".") ?
project.name.substring(project.group.length() + 1) : project.name
prefix = shortened.replace('.', '-') + "-"
var p = shortened.replace('.', '-') + "-"
if (grgit.branch.current.name != "main"
&& !grgit.branch.current.name.startsWith("release")) {
p = p + grgit.branch.current.name.replace('/', '-') + "-"
}
prefix = p
}
}
version = scmVersion.version