add build data to version string when building a branch

This commit is contained in:
andreas 2023-10-09 15:47:59 +02:00
parent c057271e37
commit 4a8ca6edf7
1 changed files with 9 additions and 1 deletions

View File

@ -566,9 +566,17 @@ class PipelineInfo{
let type=bot.textContent; let type=bot.textContent;
let val=botv.textContent; let val=botv.textContent;
if (type && val){ if (type && val){
if (type != 'release' && type != 'tag'){ if (type != 'release' && type != 'tag' && type != 'branch'){
val=type+val; val=type+val;
} }
if (type == 'branch'){
let now=new Date();
let m=now.getMonth()+1;
m=((m<10)?"0":"")+m;
let d=now.getDay();
d=((d<10)?"0":"")+d;
val=val+now.getFullYear()+m+d;
}
val=val.replace(/[:.]/g,'_'); val=val.replace(/[:.]/g,'_');
val=val.replace(/[^a-zA-Z0-9_]*/g,''); val=val.replace(/[^a-zA-Z0-9_]*/g,'');
if (val.length > 32){ if (val.length > 32){