@@ -6,7 +6,7 @@
|
||||
use std::sync::OnceLock;
|
||||
|
||||
use cargo_toml::{DepsSet, Manifest};
|
||||
use conduwuit_macros::cargo_manifest;
|
||||
use tuwunel_macros::cargo_manifest;
|
||||
|
||||
use crate::Result;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ pub mod room_version;
|
||||
pub mod rustc;
|
||||
pub mod version;
|
||||
|
||||
pub use conduwuit_macros::rustc_flags_capture;
|
||||
pub use tuwunel_macros::rustc_flags_capture;
|
||||
|
||||
pub const MODULE_ROOT: &str = const_str::split!(std::module_path!(), "::")[0];
|
||||
pub const CRATE_PREFIX: &str = const_str::split!(MODULE_ROOT, '_')[0];
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//! one true function for returning the conduwuit version with the necessary
|
||||
//! CONDUWUIT_VERSION_EXTRA env variables used if specified
|
||||
//! one true function for returning the application version with the necessary
|
||||
//! TUWUNEL_VERSION_EXTRA env variables used if specified
|
||||
//!
|
||||
//! Set the environment variable `CONDUWUIT_VERSION_EXTRA` to any UTF-8 string
|
||||
//! Set the environment variable `TUWUNEL_VERSION_EXTRA` to any UTF-8 string
|
||||
//! to include it in parenthesis after the SemVer version. A common value are
|
||||
//! git commit hashes.
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
static BRANDING: &str = "conduwuit";
|
||||
static BRANDING: &str = "Tuwunel";
|
||||
static SEMANTIC: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
static VERSION: OnceLock<String> = OnceLock::new();
|
||||
@@ -26,7 +26,8 @@ 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")
|
||||
option_env!("TUWUNEL_VERSION_EXTRA")
|
||||
.or(option_env!("CONDUWUIT_VERSION_EXTRA"))
|
||||
.or(option_env!("CONDUIT_VERSION_EXTRA"))
|
||||
.map_or(SEMANTIC.to_owned(), |extra| {
|
||||
if extra.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user