From be4abdae8fe8daef9c7373a9614611bd4a6b135c Mon Sep 17 00:00:00 2001 From: zrezke Date: Mon, 19 Jun 2023 15:43:55 +0200 Subject: [PATCH] match alpha and beta version tags --- scripts/version_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/version_util.py b/scripts/version_util.py index 0a57bcc071ff..dfb8a63fa531 100755 --- a/scripts/version_util.py +++ b/scripts/version_util.py @@ -22,7 +22,7 @@ # A regex to match the version number in Cargo.toml as SemVer, e.g., 1.2.3-alpha.0 CARGO_VERSION_REGEX: Final = r"^version\s*=\s*\"(.+)\"$" -VERSION_TAG_REGEX: Final = r"^v(?P([0-9]+)\.([0-9]+)\.([0-9]+))$" +VERSION_TAG_REGEX: Final = r"^v(?P([0-9]+)\.([0-9]+)\.([0-9]+)(?:-(alpha|beta)(?:\.([0-9]+))?)?)$" def get_cargo_version(cargo_toml: str) -> semver.VersionInfo: