WIP: Build & Release

This commit is contained in:
Michał Zieliński
2025-02-12 18:51:37 +01:00
parent 466c08f8e4
commit 201fe7e14a
2 changed files with 14 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
module.exports = async ({ github, context, core, jobId }) => {
/*
const frontendPath = `./${jobId}/frontend/diunaBI/browser/`;
const files = (require('fs').readdirSync(frontendPath).filter(file => file.endsWith('.js')))
.map(file => `${frontendPath}${file}`);
@@ -7,11 +7,9 @@ module.exports = async ({ github, context, core, jobId }) => {
core.setFailed("Frontend JS files not found");
return false;
}
*/
const files = [];
files.push(`./${jobId}/webapi/appsettings.json`);
//files.push(`./${jobId}/webapi/client_secrets.json`);
files.push(`./${jobId}/webapi/client_secrets.json`);
files.forEach(file => {
let data = require('fs').readFileSync(file, 'utf8');
@@ -26,10 +24,7 @@ module.exports = async ({ github, context, core, jobId }) => {
return false;
}
data = data.replace(new RegExp(original, 'g'), value);
console.log(`Replaced ${original} with ${value} (${token}) in ${file}`);
console.log(data);
}
console.log(data);
require('fs').writeFileSync(file, data, 'utf8');
});
}