From 109778c17c7020618ea4e035efb9f0f9b82d43ca Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Tue, 14 Jun 2022 15:38:04 -0300 Subject: [PATCH] Fix check for generated code when last updated is a release candidate --- scripts/checks/generation.sh | 2 +- scripts/generate/run.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checks/generation.sh b/scripts/checks/generation.sh index dc6751ff9..00d609f94 100755 --- a/scripts/checks/generation.sh +++ b/scripts/checks/generation.sh @@ -3,4 +3,4 @@ set -euo pipefail npm run generate -git diff --exit-code +git diff -R --exit-code diff --git a/scripts/generate/run.js b/scripts/generate/run.js index 5ebb1b37a..0072653d0 100755 --- a/scripts/generate/run.js +++ b/scripts/generate/run.js @@ -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; }