Use branch names in version.
This commit is contained in:
parent
72beccc8cd
commit
ffeaf31534
1 changed files with 6 additions and 1 deletions
|
|
@ -63,7 +63,12 @@ scmVersion {
|
||||||
tag {
|
tag {
|
||||||
def shortened = project.name.startsWith(project.group + ".") ?
|
def shortened = project.name.startsWith(project.group + ".") ?
|
||||||
project.name.substring(project.group.length() + 1) : project.name
|
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
|
version = scmVersion.version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue