[PATCH] D131650: workflows/version-check: Fix check for release candidates

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 22:28:46 PDT 2022


tstellar created this revision.
tstellar added a reviewer: thieta.
Herald added a project: All.
tstellar requested review of this revision.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131650

Files:
  .github/workflows/version-check.py


Index: .github/workflows/version-check.py
===================================================================
--- .github/workflows/version-check.py
+++ .github/workflows/version-check.py
@@ -9,7 +9,7 @@
 repo = Repo()
 
 tag = repo.git.describe(tags = True, abbrev=0)
-m = re.match('llvmorg-([0-9]+)\.([0-9]+)\.([0-9]+)', tag)
+m = re.match('llvmorg-([0-9]+)\.([0-9]+)\.([0-9]+)$', tag)
 
 if m:
     expected_major = m.group(1)
@@ -19,8 +19,11 @@
     # If the previous tag is llvmorg-X-init, then we should be at version X.0.0.
     m = re.match('llvmorg-([0-9]+)-init', tag)
     if not m:
-        print("error: Tag is not valid: ", tag)
-        sys.exit(1)
+        # Check if this is an rc tag.
+        m = re.match('llvmorg-([0-9]+)\.0\.0-rc[0-9]+', tag)
+        if not m:
+            print("error: Tag is not valid: ", tag)
+            sys.exit(1)
     expected_major = m.group(1)
     expected_minor = 0
     expected_patch = 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131650.451728.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220811/ad24b760/attachment.bin>


More information about the llvm-commits mailing list