You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
511 B

const fs = require('fs')
const updateURLLink = (newLine, target) => {
try {
const data = fs.readFileSync('../test/run-tests.sh', 'utf8')
.replace(RegExp(`## Auto-update\n${target}=.*`), `## Auto-update\n${newLine}`)
fs.writeFile('../test/run-tests.sh', data, (err, data) => {
if (err) {
console.error(err)
}
})
} catch (err) {
console.error(err)
process.exit(1)
}
}
module.exports = {
updateURLLink
}