From e63aba73c5724739f00231581a9608879f584cd9 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 22 Feb 2016 09:04:44 +0100 Subject: [PATCH] Remove "unknown" from version string. --- Cargo.lock | 6 ++++++ util/Cargo.toml | 1 + util/src/lib.rs | 1 + util/src/misc.rs | 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 8bf4a3764..cf747f3cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -241,6 +241,7 @@ dependencies = [ "serde 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.1.0", "slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -692,6 +693,11 @@ dependencies = [ "unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "target_info" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "term" version = "0.2.14" diff --git a/util/Cargo.toml b/util/Cargo.toml index da4f8e34e..62668fcc1 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -34,6 +34,7 @@ igd = "0.4.2" ethcore-devtools = { path = "../devtools" } libc = "0.2.7" vergen = "0.1" +target_info = "0.1" [features] default = [] diff --git a/util/src/lib.rs b/util/src/lib.rs index 07593e5eb..2b7438cf3 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -108,6 +108,7 @@ extern crate igd; extern crate ethcore_devtools as devtools; extern crate libc; extern crate rustc_version; +extern crate target_info; extern crate vergen; pub mod standard; diff --git a/util/src/misc.rs b/util/src/misc.rs index 22a2bb673..289f1c50c 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -18,6 +18,7 @@ use std::fs::File; use common::*; +use target_info::Target; use rustc_version; include!(concat!(env!("OUT_DIR"), "/version.rs")); @@ -68,5 +69,5 @@ pub fn contents(name: &str) -> Result { /// Get the standard version string for this software. pub fn version() -> String { - format!("Parity//{}/{}-{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date(), target(), rustc_version::version()) + format!("Parity//{}-{}-{}/{}-{}-{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date().replace("-", ""), Target::arch(), Target::os(), Target::env(), rustc_version::version()) } \ No newline at end of file