Skip to content

Commit

Permalink
allow to load predefined configs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Oct 11, 2023
1 parent ce9dceb commit 3f6177d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions webinstall/cibuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,28 @@ class PipelineInfo{
if (! structure){
structure=await loadConfig("build.yaml");
}
let ucfg=getParam('config');
let loadedCfg=undefined;
if (ucfg){
ucfg=ucfg.replace(/[^.a-zA-Z_-]/g,'');
if (gitSha !== undefined){
try{
loadedCfg=await fetchJson(GITAPI,Object.assign({},gitParam,{sha:gitSha,proxy:'webinstall/config/'+ucfg+".json"}));
}catch(e){
alert("unable to load config "+ucfg+" for selected release, trying latest");
}
}
if (loadedCfg === undefined){
try{
loadedCfg=await fetchJson('config/'+ucfg+".json");
}catch(e){
alert("unable to load config "+ucfg+": "+e);
}
}
if (loadedCfg !== undefined){
config=loadedCfg;
}
}
buildSelectors(ROOT_PATH,structure.config.children,true);
if (! isRunning()) findPipeline();
updateStatus();
Expand Down
1 change: 1 addition & 0 deletions webinstall/config/nodemcu-homberger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root:board:serial2":false,"root:board:led":false,"root:board":"nodemcu-generic","root:board:can":true,"root:board:can:tx":5,"root:board:can:rx":4,"root:board:resetButton":true,"root:board:resetButton:button":0,"root:board:resetButton:resetButtonMode":0,"root:board:resetButton:resetButtonPUD":true,"root:board:serial1":true,"root:board:serial1:type":"rx","root:board:serial1:type:RX":16}

0 comments on commit 3f6177d

Please sign in to comment.