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

(cherry picked from commit 109778c17c)
pull/3516/head
Francisco Giordano 3 years ago
parent 97c46a7d00
commit 029706d167
  1. 2
      scripts/checks/generation.sh
  2. 2
      scripts/generate/run.js

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

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

Loading…
Cancel
Save