WIP: Build & Release
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = async ({ github, context, core, jobId }) => {
|
||||
|
||||
files.forEach(file => {
|
||||
let data = require('fs').readFileSync(file, 'utf8');
|
||||
const regex = /#{(.*?)}/g;
|
||||
const regex = /#{(.*?)}#/g;
|
||||
let match;
|
||||
while (match = regex.exec(data)) {
|
||||
const original = match[0];
|
||||
@@ -25,8 +25,9 @@ module.exports = async ({ github, context, core, jobId }) => {
|
||||
core.setFailed(`Token ${token} not found`);
|
||||
return false;
|
||||
}
|
||||
data = data.replace(new RegExp(`#{${original}}`, 'g'), value);
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user