forge/arma/client/.hemtt/scripts/update_patch.rhai
2025-11-26 18:33:09 -06:00

21 lines
592 B
Rust

// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("main")
.join("script_version.hpp")
.open_file()
.read();
// Replace the current version with the new version
let prefix = "#define PATCH ";
let current = HEMTT.project().version().patch();
let next = current + 1;
script_version.replace(prefix + current.to_string(), prefix + next.to_string());
// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("main")
.join("script_version.hpp")
.create_file()
.write(script_version);