Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use custom build profile in --version #9733

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ fn main() -> Result<(), Box<dyn Error>> {
// Set formatted version strings
let pkg_version = env::var("CARGO_PKG_VERSION")?;

// Append the profile to the version string, defaulting to "debug".
let profile = env::var("PROFILE").unwrap_or_else(|_| String::from("debug"));
// Append the profile to the version string
let out_dir = env::var("OUT_DIR").unwrap();
let profile = out_dir.rsplit(std::path::MAIN_SEPARATOR).nth(3).unwrap();

// Set the build timestamp.
let build_timestamp = env::var("VERGEN_BUILD_TIMESTAMP")?;
Expand Down
Loading