refactor: use literals instead of new RegExp() where possible (#38458)
This commit is contained in:
parent
0203bd3305
commit
a6f7c7690d
2 changed files with 2 additions and 4 deletions
|
@ -187,8 +187,7 @@ async function promptForVersion (version) {
|
|||
|
||||
// function to determine if there have been commits to main since the last release
|
||||
async function changesToRelease () {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const lastCommitWasRelease = new RegExp('^Bump v[0-9]+\.[0-9]+\.[0-9]+(-beta\.[0-9]+)?(-alpha\.[0-9]+)?(-nightly\.[0-9]+)?$', 'g');
|
||||
const lastCommitWasRelease = /^Bump v[0-9]+.[0-9]+.[0-9]+(-beta.[0-9]+)?(-alpha.[0-9]+)?(-nightly.[0-9]+)?$/g;
|
||||
const lastCommit = await GitProcess.exec(['log', '-n', '1', '--pretty=format:\'%s\''], ELECTRON_DIR);
|
||||
return !lastCommitWasRelease.test(lastCommit.stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue