feat: versioning SemVer MAJOR.MINOR.PATCH basé sur git describe
CI / lint (push) Failing after 9s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 13s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

- backend/version.py: get_version() lit git describe --tags (ex: 1.8.0-301-gabc1234)
- main.py: FastAPI version = get_version() dynamique
- build.rs: injecte GIT_VERSION, GIT_HASH, SEMVER depuis git describe
- main.rs: ABOUT_MSG, get_version(), log utilisent GIT_VERSION
- Format: MAJOR.MINOR.PATCH[-commits-gHASH] (ex: 1.8.0, 1.8.0-3-gabc1234)
- Fallback: VERSION file ou 0.0.0-dev si Git indisponible
This commit is contained in:
2026-07-27 17:16:52 -04:00
parent da00aa4826
commit c8b19d507a
4 changed files with 88 additions and 10 deletions
+3 -6
View File
@@ -240,9 +240,7 @@ fn get_backend_url() -> String {
#[tauri::command]
fn get_version() -> String {
let cargo_version = env!("CARGO_PKG_VERSION");
let git_hash = env!("GIT_HASH");
format!("v{}-{}", cargo_version, git_hash)
env!("GIT_VERSION").to_string()
}
#[tauri::command]
@@ -422,7 +420,7 @@ fn get_window_state() -> AppConfig {
// Build About message once at compile time
const ABOUT_MSG: &str = concat!(
"ObsiGate Desktop v", env!("CARGO_PKG_VERSION"), "-", env!("GIT_HASH"),
"ObsiGate Desktop ", env!("GIT_VERSION"),
"\\n\\nPorte d\\'entrée native pour vos vaults Obsidian.",
"\\nConstruit avec Tauri + Rust.",
"\\n\\n© Bruno Charest — Licence MIT",
@@ -447,8 +445,7 @@ fn main() {
})
.try_init();
let version_str = format!("v{}-{}", env!("CARGO_PKG_VERSION"), env!("GIT_HASH"));
info!("ObsiGate Desktop {} starting", version_str);
info!("ObsiGate Desktop {} starting", env!("GIT_VERSION"));
// Resolve exe directory
let exe_dir = std::env::current_exe()