feat: restore custom build profiles in RETH_BUILD_PROFILE (#13906)

This commit is contained in:
Dan Cline
2025-01-21 18:03:18 -05:00
committed by GitHub
parent d2b454236f
commit 6d2648dc1b

View File

@ -29,7 +29,8 @@ fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rustc-env=VERGEN_GIT_SHA_SHORT={}", &sha[..8]);
// Set the build profile
let profile = env::var("PROFILE")?;
let out_dir = env::var("OUT_DIR").unwrap();
let profile = out_dir.rsplit(std::path::MAIN_SEPARATOR).nth(3).unwrap();
println!("cargo:rustc-env=RETH_BUILD_PROFILE={profile}");
// Set formatted version strings