Skip to content

Commit

Permalink
match alpha and beta version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
zrezke committed Jun 19, 2023
1 parent 75838dc commit be4abda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/version_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<version>([0-9]+)\.([0-9]+)\.([0-9]+))$"
VERSION_TAG_REGEX: Final = r"^v(?P<version>([0-9]+)\.([0-9]+)\.([0-9]+)(?:-(alpha|beta)(?:\.([0-9]+))?)?)$"


def get_cargo_version(cargo_toml: str) -> semver.VersionInfo:
Expand Down

0 comments on commit be4abda

Please sign in to comment.