From 56cdc5664fa381f73c09063c64292b72637f1375 Mon Sep 17 00:00:00 2001 From: Clint J Edwards Date: Fri, 18 Sep 2026 12:50:59 -0600 Subject: [PATCH] [release] Fix `get_version_int` to support new build var In #48436 we updated `build.rs` to support overriding the final version string. This did not account for `get_version_int` which assumes the build string is the older version and strips it to find the semver string. Since the only place we use this function is to parse out the major semver version for feature flagging, this PR fixes things by always pulling from the `cargo.toml` listed version instead. --- build.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 869fbf51..10ea7c89 100644 --- a/build.rs +++ b/build.rs @@ -17,12 +17,11 @@ fn get_version() -> String { } fn get_version_int() -> Result> { - let version = - env::var("PUSHPIN_BUILD_VERSION").unwrap_or_else(|_| env!("CARGO_PKG_VERSION").to_string()); + let version = env!("CARGO_PKG_VERSION"); let version = match version.find('-') { Some(pos) => &version[..pos], - None => &version, + None => version, }; let mut v = 0;