refactor: Move git version info gather in into a build script
This commit is contained in:
parent
e1655edd83
commit
a98da7d942
14 changed files with 231 additions and 123 deletions
|
@ -67,6 +67,7 @@ checked_ops.workspace = true
|
|||
chrono.workspace = true
|
||||
clap.workspace = true
|
||||
conduwuit-macros.workspace = true
|
||||
conduwuit-build-metadata.workspace = true
|
||||
const-str.workspace = true
|
||||
core_affinity.workspace = true
|
||||
ctor.workspace = true
|
||||
|
|
|
@ -26,13 +26,6 @@ pub fn user_agent() -> &'static str { USER_AGENT.get_or_init(init_user_agent) }
|
|||
fn init_user_agent() -> String { format!("{}/{}", name(), version()) }
|
||||
|
||||
fn init_version() -> String {
|
||||
option_env!("CONDUWUIT_VERSION_EXTRA")
|
||||
.or(option_env!("CONDUIT_VERSION_EXTRA"))
|
||||
.map_or(SEMANTIC.to_owned(), |extra| {
|
||||
if extra.is_empty() {
|
||||
SEMANTIC.to_owned()
|
||||
} else {
|
||||
format!("{SEMANTIC} ({extra})")
|
||||
}
|
||||
})
|
||||
conduwuit_build_metadata::VERSION_EXTRA
|
||||
.map_or(SEMANTIC.to_owned(), |extra| format!("{SEMANTIC} ({extra})"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue