Fix check for generated code when last updated is a release candidate

(cherry picked from commit 109778c17c)
This commit is contained in:
Francisco Giordano
2022-06-14 15:38:04 -03:00
parent 97c46a7d00
commit 029706d167
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,4 @@
set -euo pipefail set -euo pipefail
npm run generate npm run generate
git diff --exit-code git diff -R --exit-code

View File

@ -7,7 +7,7 @@ function getVersion (path) {
try { try {
return fs return fs
.readFileSync(path, 'utf8') .readFileSync(path, 'utf8')
.match(/\/\/ OpenZeppelin Contracts \(last updated v\d+\.\d+\.\d+\)/)[0]; .match(/\/\/ OpenZeppelin Contracts \(last updated v[^)]+\)/)[0];
} catch (err) { } catch (err) {
return null; return null;
} }