Include git commit date & hash.

This commit is contained in:
Gav Wood
2016-02-21 21:14:09 +01:00
parent 22ff5bb7d7
commit ea187253a2
5 changed files with 30 additions and 10 deletions

View File

@@ -82,7 +82,6 @@
//! cargo build --release
//! ```
extern crate target_info;
extern crate slab;
extern crate rustc_serialize;
extern crate mio;
@@ -109,6 +108,7 @@ extern crate igd;
extern crate ethcore_devtools as devtools;
extern crate libc;
extern crate rustc_version;
extern crate vergen;
pub mod standard;
#[macro_use]

View File

@@ -18,9 +18,10 @@
use std::fs::File;
use common::*;
use target_info::Target;
use rustc_version;
include!(concat!(env!("OUT_DIR"), "/version.rs"));
#[derive(Debug,Clone,PartialEq,Eq)]
/// Diff type for specifying a change (or not).
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.
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())
}