Skip to content

Commit ba22877

Browse files
bors[bot]patchfx
andauthored
Merge #120
120: Add rc to godot version regex r=Bromeon a=patchfx Fixes #119 Co-authored-by: Richard Patching <[email protected]>
2 parents 9eca3cc + 3e74ebd commit ba22877

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

godot-codegen/src/godot_version.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn parse_godot_version(version_str: &str) -> Result<GodotVersion, Box<dyn Er
3030
let regex = Regex::new(
3131
// major minor [patch] official|custom_build|gentoo
3232
// v v v v
33-
r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)[0-9]*\.(?:mono\.)?(?:[a-z_]+\.([a-f0-9]+)|official)"#,
33+
r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|rc|stable)[0-9]*\.(?:mono\.)?(?:[a-z_]+\.([a-f0-9]+)|official)"#,
3434
)?;
3535

3636
let fail = || format!("Version substring cannot be parsed: `{version_str}`");
@@ -71,6 +71,7 @@ fn test_godot_versions() {
7171
("4.0.dev.custom_build.e7e9e663b", 4, 0, 0, "dev", s("e7e9e663b")),
7272
("4.0.alpha.custom_build.faddbcfc0", 4, 0, 0, "alpha", s("faddbcfc0")),
7373
("4.0.beta8.mono.custom_build.b28ddd918", 4, 0, 0, "beta", s("b28ddd918")),
74+
("4.0.rc1.official.8843d9ad3", 4, 0, 0, "rc", s("8843d9ad3")),
7475
];
7576

7677
let bad_versions = [

0 commit comments

Comments
 (0)