mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 19:28:00 +01:00
Include target in user-agent
This commit is contained in:
1
build.rs
1
build.rs
@@ -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(())
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user