Apply patch from perillamint on github

use git hash to describe version number
This commit is contained in:
asonix
2023-01-01 09:46:44 -06:00
parent d4e51a1afa
commit 5f5c34640f
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -367,7 +367,7 @@ impl Config {
fn git_version() -> Option<String> {
let branch = Self::git_branch()?;
let hash = Self::git_hash()?;
let hash = Self::git_short_hash()?;
Some(format!("{}-{}", branch, hash))
}
@@ -388,6 +388,10 @@ impl Config {
option_env!("GIT_HASH")
}
fn git_short_hash() -> Option<&'static str> {
option_env!("GIT_SHORT_HASH")
}
pub(crate) fn user_agent(&self) -> String {
format!(
"{} ({}/{}; +{})",