fix: log git hash on build success and startup to verify which commit is running

Writes HEAD short hash to .huskies/build_hash after successful cargo
build. Logs it on startup as [startup] Running build: <hash>. No more
guessing whether the rebuild actually deployed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-04-11 20:50:15 +00:00
parent e32300d1f8
commit 8393a67c89
2 changed files with 17 additions and 1 deletions
+5
View File
@@ -171,6 +171,11 @@ async fn main() -> Result<(), std::io::Error> {
}
});
// Log the build hash so we can verify which commit is running.
let build_hash = std::fs::read_to_string(".huskies/build_hash")
.unwrap_or_else(|_| "unknown".to_string());
slog!("[startup] Running build: {}", build_hash.trim());
let app_state = Arc::new(SessionState::default());
let cwd = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
// Migrate legacy root-level store.json into .huskies/ if the new path does