Include channel and commit info in the version of pre-release builds (#6819)

This commit is contained in:
Michael Vines
2019-11-10 22:39:13 -07:00
committed by GitHub
parent 5835b3b8eb
commit cfab36cb1d
5 changed files with 25 additions and 12 deletions

View File

@@ -5,6 +5,24 @@
//! command-line tools to spin up validators and a Rust library
//!
#[macro_export]
macro_rules! version {
() => {
&*format!(
"{}{}",
env!("CARGO_PKG_VERSION"),
if option_env!("CI_TAG").is_none() {
format!(
" [channel={} commit={}]",
option_env!("CHANNEL").unwrap_or("unknown"),
option_env!("CI_COMMIT").unwrap_or("unknown"),
)
} else {
"".to_string()
},
)
};
}
pub mod banking_stage;
pub mod blob;
pub mod broadcast_stage;
@@ -57,7 +75,6 @@ pub mod streamer;
pub mod tpu;
pub mod tvu;
pub mod validator;
pub(crate) mod version;
pub mod weighted_shuffle;
pub mod window_service;