Include git commit date & hash.
This commit is contained in:
parent
22ff5bb7d7
commit
ea187253a2
21
Cargo.lock
generated
21
Cargo.lock
generated
@ -52,6 +52,11 @@ name = "bitflags"
|
|||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "blastfig"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
@ -236,9 +241,9 @@ dependencies = [
|
|||||||
"serde 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sha3 0.1.0",
|
"sha3 0.1.0",
|
||||||
"slab 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -687,11 +692,6 @@ dependencies = [
|
|||||||
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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]]
|
[[package]]
|
||||||
name = "term"
|
name = "term"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
@ -788,6 +788,15 @@ dependencies = [
|
|||||||
"rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "vergen"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"blastfig 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
|
@ -5,6 +5,7 @@ license = "GPL-3.0"
|
|||||||
name = "ethcore-util"
|
name = "ethcore-util"
|
||||||
version = "0.9.99"
|
version = "0.9.99"
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Ethcore <admin@ethcore.io>"]
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
@ -28,12 +29,15 @@ sha3 = { path = "sha3" }
|
|||||||
serde = "0.6.7"
|
serde = "0.6.7"
|
||||||
clippy = { version = "0.0.42", optional = true }
|
clippy = { version = "0.0.42", optional = true }
|
||||||
json-tests = { path = "json-tests" }
|
json-tests = { path = "json-tests" }
|
||||||
target_info = "0.1.0"
|
|
||||||
rustc_version = "0.1.0"
|
rustc_version = "0.1.0"
|
||||||
igd = "0.4.2"
|
igd = "0.4.2"
|
||||||
ethcore-devtools = { path = "../devtools" }
|
ethcore-devtools = { path = "../devtools" }
|
||||||
libc = "0.2.7"
|
libc = "0.2.7"
|
||||||
|
vergen = "*"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
dev = ["clippy"]
|
dev = ["clippy"]
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
vergen = "*"
|
||||||
|
6
util/build.rs
Normal file
6
util/build.rs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
extern crate vergen;
|
||||||
|
use vergen::*;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
vergen(OutputFns::all()).unwrap();
|
||||||
|
}
|
@ -82,7 +82,6 @@
|
|||||||
//! cargo build --release
|
//! cargo build --release
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
extern crate target_info;
|
|
||||||
extern crate slab;
|
extern crate slab;
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate mio;
|
extern crate mio;
|
||||||
@ -109,6 +108,7 @@ extern crate igd;
|
|||||||
extern crate ethcore_devtools as devtools;
|
extern crate ethcore_devtools as devtools;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
extern crate rustc_version;
|
extern crate rustc_version;
|
||||||
|
extern crate vergen;
|
||||||
|
|
||||||
pub mod standard;
|
pub mod standard;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -18,9 +18,10 @@
|
|||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use common::*;
|
use common::*;
|
||||||
use target_info::Target;
|
|
||||||
use rustc_version;
|
use rustc_version;
|
||||||
|
|
||||||
|
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
||||||
|
|
||||||
#[derive(Debug,Clone,PartialEq,Eq)]
|
#[derive(Debug,Clone,PartialEq,Eq)]
|
||||||
/// Diff type for specifying a change (or not).
|
/// Diff type for specifying a change (or not).
|
||||||
pub enum Diff<T> where T: Eq {
|
pub enum Diff<T> where T: Eq {
|
||||||
@ -67,5 +68,5 @@ pub fn contents(name: &str) -> Result<Bytes, UtilError> {
|
|||||||
|
|
||||||
/// Get the standard version string for this software.
|
/// Get the standard version string for this software.
|
||||||
pub fn version() -> String {
|
pub fn version() -> String {
|
||||||
format!("Parity/-/{}/{}-{}-{}/{}", env!("CARGO_PKG_VERSION"), Target::arch(), Target::env(), Target::os(), rustc_version::version())
|
format!("Parity/{}/{}-{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), short_sha(), commit_date(), target(), rustc_version::version())
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user