mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-02-11 07:03:07 +01:00
add buildname to ci output file names, correctly set initial build name
This commit is contained in:
@@ -167,9 +167,18 @@ class PipelineInfo{
|
|||||||
updateStatus();
|
updateStatus();
|
||||||
if (gitSha !== undefined) param.tag=gitSha;
|
if (gitSha !== undefined) param.tag=gitSha;
|
||||||
param.config=JSON.stringify(config);
|
param.config=JSON.stringify(config);
|
||||||
|
let buildname=config['root:buildname']
|
||||||
|
if (buildname){
|
||||||
|
param.suffix="-"+buildname
|
||||||
|
}
|
||||||
if (buildVersion !== undefined){
|
if (buildVersion !== undefined){
|
||||||
|
if (param.suffix){
|
||||||
|
param.suffix+="-"+buildVersion;
|
||||||
|
}
|
||||||
|
else{
|
||||||
param.suffix="-"+buildVersion;
|
param.suffix="-"+buildVersion;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fetchJson(API,Object.assign({
|
fetchJson(API,Object.assign({
|
||||||
api:'start'},param))
|
api:'start'},param))
|
||||||
.then((json)=>{
|
.then((json)=>{
|
||||||
@@ -528,13 +537,10 @@ class PipelineInfo{
|
|||||||
if (config.type === 'string'){
|
if (config.type === 'string'){
|
||||||
let ip=addEl('input','t'+config.type,inputFrame);
|
let ip=addEl('input','t'+config.type,inputFrame);
|
||||||
addDescription(config,inputFrame);
|
addDescription(config,inputFrame);
|
||||||
ip.value=current?current:"";
|
const buildChild=(value)=>{
|
||||||
ip.addEventListener('change',(ev)=>{
|
if (value) {
|
||||||
let value=ev.target.value;
|
|
||||||
let modified=false;
|
|
||||||
if (config.max) {
|
if (config.max) {
|
||||||
if (value && value.length > config.max) {
|
if (value && value.length > config.max) {
|
||||||
modified=true;
|
|
||||||
value = value.substring(0, config.max);
|
value = value.substring(0, config.max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -542,14 +548,21 @@ class PipelineInfo{
|
|||||||
let check = new RegExp("[^" + config.allowed + "]", "g");
|
let check = new RegExp("[^" + config.allowed + "]", "g");
|
||||||
let nv = value.replace(check, "");
|
let nv = value.replace(check, "");
|
||||||
if (nv != value) {
|
if (nv != value) {
|
||||||
modified=true;
|
|
||||||
value = nv;
|
value = nv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (modified){
|
|
||||||
ev.target.value=value;
|
|
||||||
}
|
}
|
||||||
callback(Object.assign({},config,{key: value,value:value}),false);
|
return Object.assign({},config,{key: value,value:value});
|
||||||
|
}
|
||||||
|
initialConfig=buildChild(current);
|
||||||
|
ip.value=initialConfig.value||"";
|
||||||
|
ip.addEventListener('change',(ev)=>{
|
||||||
|
let value=ev.target.value;
|
||||||
|
let cbv=buildChild(value);
|
||||||
|
if (cbv.value != value){
|
||||||
|
ev.target.value=cbv.value;
|
||||||
|
}
|
||||||
|
callback(cbv,false);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user