Skip to content

Commit 67416fe

Browse files
committed
Set Godot default version to 4.2
Also update since_api/before_api generation.
1 parent 2a0a2bd commit 67416fe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

godot-bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ custom-godot = ["dep:bindgen", "dep:regex", "dep:which"]
1818
custom-godot-extheader = []
1919

2020
[dependencies]
21-
godot4-prebuilt = { optional = true, git = "https://github.com/godot-rust/godot4-prebuilt", branch = "4.1.1" }
21+
godot4-prebuilt = { optional = true, git = "https://github.com/godot-rust/godot4-prebuilt", branch = "4.2" }
2222

2323
# Version >= 1.5.5 for security: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html
2424
# 'unicode-gencat' needed for \d, see: https://docs.rs/regex/1.5.5/regex/#unicode-features

godot-bindings/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ pub use prebuilt::*;
124124
// ----------------------------------------------------------------------------------------------------------------------------------------------
125125
// Common
126126

127+
const NEXT_MINOR_VERSION: u8 = 3;
128+
127129
pub fn clear_dir(dir: &Path, watch: &mut StopWatch) {
128130
if dir.exists() {
129131
std::fs::remove_dir_all(dir).unwrap_or_else(|e| panic!("failed to delete dir: {e}"));
@@ -141,7 +143,7 @@ pub fn emit_godot_version_cfg() {
141143
} = get_godot_version();
142144

143145
// Start at 1; checking for "since/before 4.0" makes no sense
144-
let max = 2;
146+
let max = NEXT_MINOR_VERSION;
145147
for m in 1..=minor {
146148
println!(r#"cargo:rustc-cfg=since_api="{major}.{m}""#);
147149
}

0 commit comments

Comments
 (0)