Use proper version string.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
use std::fs::File;
|
||||
use common::*;
|
||||
use target_info::Target;
|
||||
use rustc_version;
|
||||
|
||||
#[derive(Debug,Clone,PartialEq,Eq)]
|
||||
/// Diff type for specifying a change (or not).
|
||||
@@ -62,3 +64,8 @@ pub fn contents(name: &str) -> Result<Bytes, UtilError> {
|
||||
try!(file.read_to_end(&mut ret));
|
||||
Ok(ret)
|
||||
}
|
||||
|
||||
/// 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())
|
||||
}
|
||||
Reference in New Issue
Block a user