Show commit in --version
and ledger-tool's log (#12636)
* Show commit in `--version` and ledger-tool's log * Another handy hidden env var * Fix test * Rename to semver! * Fix syntax error...
This commit is contained in:
@ -91,12 +91,19 @@ impl fmt::Debug for Version {
|
||||
impl Sanitize for Version {}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! version {
|
||||
macro_rules! semver {
|
||||
() => {
|
||||
&*format!("{}", $crate::Version::default())
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! version {
|
||||
() => {
|
||||
&*format!("{:?}", $crate::Version::default())
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
|
Reference in New Issue
Block a user