Include target in user-agent

This commit is contained in:
Marcin Kulik
2024-04-30 21:55:15 +02:00
parent 420001759c
commit 9c32809a38
2 changed files with 7 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ fn main() -> std::io::Result<()> {
}
}
println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
println!("cargo:rerun-if-env-changed={ENV_KEY}");
Ok(())

View File

@@ -95,7 +95,12 @@ fn get_username() -> String {
}
fn build_user_agent() -> String {
let ua = concat!("asciinema/", env!("CARGO_PKG_VERSION")); // TODO add more system info
let ua = concat!(
"asciinema/",
env!("CARGO_PKG_VERSION"),
" target/",
env!("TARGET")
);
ua.to_owned()
}