Add crate version and commit hash to ldk-server#229
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
| let (shutdown_tx, shutdown_rx) = tokio::sync::watch::channel(false); | ||
|
|
||
| info!("Starting up..."); | ||
| info!("Starting ldk-server version {FULL_VERSION}"); |
There was a problem hiding this comment.
Should we also do this when we rotate the logs ?
|
|
||
| fn main() { | ||
| println!("cargo:rerun-if-changed=build.rs"); | ||
| println!("cargo:rerun-if-env-changed=GIT_HASH"); |
There was a problem hiding this comment.
Can we make sure to update GIT_HASH if HEAD changes after the first from-clean build. Here it seems HEAD could change, and we'd ship a binary with a wrong rev ?
Or perhaps cargo install always re-runs build.rs so we might be good here.
There was a problem hiding this comment.
Also trying to understand how this triggers. After build.rs sets GIT_HASH, what other thing could cause GIT_HASH to change, and trigger build.rs again ?
There was a problem hiding this comment.
Made it so it washes the git hash file so if it changes then we recalc
We will now log the version number and commit hash when starting up. Also will give the full commit hash when doing ldk-server --version to better help debugging things.
9de46b4 to
5d6e906
Compare
We will now log the version number and commit hash when starting up. Also will give the full commit hash when doing ldk-server --version to better help debugging things.
Also does the same to the cli