diff --git a/.github/workflows/version-check.py b/.github/workflows/version-check.py --- a/.github/workflows/version-check.py +++ b/.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