Use branch names in version. (#3)
This commit is contained in:
commit
d9c2f6edd3
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue