mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-14 19:58:24 -04:00
15 lines
470 B
Rust
15 lines
470 B
Rust
pub const CLI_VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
pub const CLI_GIT_HASH: &str = env!("GIT_HASH");
|
|
|
|
pub fn long_version() -> String {
|
|
format!(
|
|
"\
|
|
Path: {path}
|
|
Commit: {commit}
|
|
spacetimedb tool version {CLI_VERSION}; spacetimedb-lib version {lib_ver};",
|
|
path = std::env::current_exe().unwrap_or_else(|_| "<unknown>".into()).display(),
|
|
commit = CLI_GIT_HASH,
|
|
lib_ver = spacetimedb_lib::version::spacetimedb_lib_version()
|
|
)
|
|
}
|