Browse Source
Changelog: None Signed-off-by: Ole Petter <ole.orhagen@northern.tech>change-dependabot-prefix
Ole Petter
3 years ago
2 changed files with 30 additions and 30 deletions
@ -1,18 +1,18 @@ |
|||||
const fs = require('fs') |
const fs = require('fs'); |
||||
const updateURLLink = (newLine, target) => { |
const updateURLLink = (newLine, target) => { |
||||
try { |
try { |
||||
const data = fs.readFileSync('../test/run-tests.sh', 'utf8') |
const data = fs.readFileSync('../test/run-tests.sh', 'utf8') |
||||
.replace(RegExp(`## Auto-update\n${target}=.*`), `## Auto-update\n${newLine}`) |
.replace(RegExp(`## Auto-update\n${target}=.*`), `## Auto-update\n${newLine}`); |
||||
fs.writeFile('../test/run-tests.sh', data, (err, data) => { |
fs.writeFile('../test/run-tests.sh', data, (err, data) => { |
||||
if (err) { |
if (err) { |
||||
console.error(err) |
console.error(err); |
||||
} |
} |
||||
}) |
}); |
||||
} catch (err) { |
} catch (err) { |
||||
console.error(err) |
console.error(err); |
||||
process.exit(1) |
process.exit(1); |
||||
} |
|
||||
} |
} |
||||
|
}; |
||||
module.exports = { |
module.exports = { |
||||
updateURLLink |
updateURLLink |
||||
} |
}; |
||||
|
Loading…
Reference in new issue