소스 검색

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

Francisco Giordano 3 년 전
부모
커밋
109778c17c
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;
   }