Clone jobs
This commit is contained in:
parent
2426465d7d
commit
bb65e72373
1 changed files with 4 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ def getGitRevision(String gitrootpath, int basebuildnumber) {
|
|||
// Handle:
|
||||
// origin/master
|
||||
// origin/2.0.x
|
||||
def getVersionPrefix(String sourcebranch) {
|
||||
def getVersionPrefix(String sourcebranch, boolean droptrailingdot = false) {
|
||||
echo "Determining version number prefix from source branch name: ${sourcebranch}"
|
||||
sourcebranch = sourcebranch.toLowerCase()
|
||||
|
||||
|
|
@ -121,6 +121,9 @@ def getVersionPrefix(String sourcebranch) {
|
|||
versionprefix += "0."
|
||||
}
|
||||
}
|
||||
if (droptrailingdot == true) {
|
||||
versionprefix = versionprefix.substring(0, versionprefix.length() - 1);
|
||||
}
|
||||
echo "Determined version prefix to be: ${versionprefix}"
|
||||
return versionprefix
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue