feat: Log version string during startup
This commit is contained in:
11
src/version.rs
Normal file
11
src/version.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
pub const VERSION: &str = get_version();
|
||||
|
||||
const fn get_version() -> &'static str {
|
||||
if let Some(version) = std::option_env!("RELEASE_VERSION")
|
||||
&& !version.is_empty()
|
||||
{
|
||||
version
|
||||
} else {
|
||||
git_version::git_version!(fallback = "unknown")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user