diff --git a/webinstall/build.yaml b/webinstall/build.yaml index 566e314..99a0881 100644 --- a/webinstall/build.yaml +++ b/webinstall/build.yaml @@ -146,9 +146,11 @@ types: - <<: *gpiopin key: RX target: "define:GWSERIAL_RX" + mandatory: true - <<: *gpiopin key: TX target: "define:GWSERIAL_TX" + mandatory: true - key: bi value: 2 label: "BiDir" @@ -157,9 +159,11 @@ types: - <<: *gpiopin key: RX target: "define:GWSERIAL_RX" + mandatory: true - <<: *gpiopin key: TX target: "define:GWSERIAL_TX" + mandatory: true - key: rx value: 3 label: "RX" @@ -168,6 +172,7 @@ types: - <<: *gpiopin key: RX target: "define:GWSERIAL_RX" + mandatory: true - key: tx value: 1 label: "TX" @@ -176,6 +181,7 @@ types: - <<: *gpiopin key: TX target: "define:GWSERIAL_TX" + mandatory: true resources: default: &esp32default serial: 2 diff --git a/webinstall/cibuild.js b/webinstall/cibuild.js index 12829d2..976f550 100644 --- a/webinstall/cibuild.js +++ b/webinstall/cibuild.js @@ -270,9 +270,12 @@ class PipelineInfo{ } } } - if (rt.target === undefined && typeof(parent) === 'object' && parent.target !== undefined){ + if (rt.target === undefined && typeof(parent) === 'object'){ rt.target=parent.target; } + if (rt.mandatory === undefined && typeof(parent) === 'object'){ + rt.mandatory=parent.mandatory; + } return rt; } const expandList=(lst,parent)=>{ @@ -453,7 +456,13 @@ class PipelineInfo{ for (let k in configStruct) { let struct = configStruct[k]; if (round > 0) config[k] = struct.key; - if (struct.target !== undefined && struct.value !== undefined) { + if (struct.target !== undefined ) { + if (struct.value === undefined){ + if (struct.mandatory && round > 0){ + errors+=" missing value for "+k+"\n"; + } + continue; + } if (struct.target === 'environment' ) { if (round > 0) environment = struct.value; else allowedResources=struct.resource;