From 53a20cba29638869fa6ed67ca406a9aa936e337c Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 6 Nov 2022 12:10:30 -0500 Subject: [PATCH 1/2] fixed regex parsing for godot4 beta4 --- godot-codegen/src/godot_version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godot-codegen/src/godot_version.rs b/godot-codegen/src/godot_version.rs index 5530fb076..be1bef087 100644 --- a/godot-codegen/src/godot_version.rs +++ b/godot-codegen/src/godot_version.rs @@ -28,7 +28,7 @@ pub struct GodotVersion { pub fn parse_godot_version(version_str: &str) -> Result> { let regex = Regex::new( - r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)\.(?:(?:official|custom_build)\.([a-f0-9]+)|official)"#, + r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)4?\.(?:(?:official|custom_build)\.([a-f0-9]+)|official)"#, )?; let caps = regex.captures(version_str).ok_or("Regex capture failed")?; From 440475b7524cee7dbe21fc19558854d5d94239d3 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 6 Nov 2022 12:13:32 -0500 Subject: [PATCH 2/2] fixed regex parsing for godot4 beta4 --- godot-codegen/src/godot_version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godot-codegen/src/godot_version.rs b/godot-codegen/src/godot_version.rs index be1bef087..d4654514a 100644 --- a/godot-codegen/src/godot_version.rs +++ b/godot-codegen/src/godot_version.rs @@ -28,7 +28,7 @@ pub struct GodotVersion { pub fn parse_godot_version(version_str: &str) -> Result> { let regex = Regex::new( - r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)4?\.(?:(?:official|custom_build)\.([a-f0-9]+)|official)"#, + r#"(\d+)\.(\d+)(?:\.(\d+))?\.(alpha|beta|dev|stable)[0-9]*\.(?:(?:official|custom_build)\.([a-f0-9]+)|official)"#, )?; let caps = regex.captures(version_str).ok_or("Regex capture failed")?;