瀏覽代碼

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

(cherry picked from commit 109778c17c7020618ea4e035efb9f0f9b82d43ca)
Francisco Giordano 3 年之前
父節點
當前提交
029706d167
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      scripts/checks/generation.sh
  2. 1 1
      scripts/generate/run.js

+ 1 - 1
scripts/checks/generation.sh

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

+ 1 - 1
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;
   }