Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
120: Add rc to godot version regex r=Bromeon a=patchfx

Fixes godot-rust#119

Co-authored-by: Richard Patching <richard@justaddpixels.com>
  • Loading branch information
bors[bot] and patchfx committed Feb 9, 2023
2 parents 9eca3cc + 3e74ebd commit ba22877
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion godot-codegen/src/godot_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn parse_godot_version(version_str: &str) -> Result<GodotVersion, Box<dyn Er
let regex = Regex::new(
// major minor [patch] official|custom_build|gentoo
// v v v v
r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)[0-9]*\.(?:mono\.)?(?:[a-z_]+\.([a-f0-9]+)|official)"#,
r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|rc|stable)[0-9]*\.(?:mono\.)?(?:[a-z_]+\.([a-f0-9]+)|official)"#,
)?;

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

let bad_versions = [
Expand Down

0 comments on commit ba22877

Please sign in to comment.