diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 4179e0a..d3c010f 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -11,14 +11,15 @@ pub fn get_handlers() -> Box) + Send + Sync> { #[tauri::command] fn get_version() -> String { + let date = constants::COMMIT_DATE.split('T').collect::>()[0]; let commit_tag = constants::COMMIT_TAG; if !commit_tag.is_empty() && commit_tag.to_lowercase().contains("snapshot") { - return commit_tag.to_owned() + format!("{} ({})", commit_tag, date) + } else { + format!("{}-{} ({})", + constants::VERSION, + constants::COMMIT_HASH[0..7].to_owned(), + date + ) } - - format!("{}-{} ({})", - constants::VERSION, - constants::COMMIT_HASH[0..7].to_owned(), - constants::COMMIT_DATE.split('T').collect::>()[0] - ) }