shared: ignore dirty, if git is present we're developing
When developing dirty can get out of between client and server if you're only doing development in one.
This commit is contained in:
parent
487d7084c3
commit
215b8cd41d
@ -1,5 +1,5 @@
|
|||||||
|
use build_info::{BuildInfo, VersionControl};
|
||||||
use notmuch::SearchSummary;
|
use notmuch::SearchSummary;
|
||||||
use build_info::{VersionControl,BuildInfo};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
@ -34,16 +34,12 @@ pub mod urls {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn build_version(bi:fn()->&'static BuildInfo) -> String {
|
pub fn build_version(bi: fn() -> &'static BuildInfo) -> String {
|
||||||
fn commit(git: &Option<VersionControl>) -> String {
|
fn commit(git: &Option<VersionControl>) -> String {
|
||||||
let Some(VersionControl::Git(git)) = git else {
|
let Some(VersionControl::Git(git)) = git else {
|
||||||
return String::new();
|
return String::new();
|
||||||
};
|
};
|
||||||
let mut s = vec!["-".to_string(), git.commit_short_id.clone()];
|
let mut s = vec!["-".to_string(), git.commit_short_id.clone()];
|
||||||
if git.dirty {
|
|
||||||
s.push(".+".to_string());
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(branch) = &git.branch {
|
if let Some(branch) = &git.branch {
|
||||||
s.push(format!(" ({branch})"));
|
s.push(format!(" ({branch})"));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user