mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-10-06 19:00:48 +00:00
24 lines
805 B
Rust
24 lines
805 B
Rust
|
pub mod built {
|
||
|
include!(concat!(env!("OUT_DIR"), "/built.rs"));
|
||
|
}
|
||
|
|
||
|
pub static GIT_COMMIT_HASH: Option<&str> = option_env!("GIT_COMMIT_HASH");
|
||
|
|
||
|
pub static GIT_COMMIT_HASH_SHORT: Option<&str> = option_env!("GIT_COMMIT_HASH_SHORT");
|
||
|
|
||
|
// this would be a lot better if Option::or was const.
|
||
|
pub static VERSION_EXTRA: Option<&str> =
|
||
|
if let v @ Some(_) = option_env!("CONTINUWUITY_VERSION_EXTRA") {
|
||
|
v
|
||
|
} else if let v @ Some(_) = option_env!("CONDUWUIT_VERSION_EXTRA") {
|
||
|
v
|
||
|
} else if let v @ Some(_) = option_env!("CONDUIT_VERSION_EXTRA") {
|
||
|
v
|
||
|
} else {
|
||
|
GIT_COMMIT_HASH_SHORT
|
||
|
};
|
||
|
pub static GIT_REMOTE_WEB_URL: Option<&str> = option_env!("GIT_REMOTE_WEB_URL");
|
||
|
pub static GIT_REMOTE_COMMIT_URL: Option<&str> = option_env!("GIT_REMOTE_COMMIT_URL");
|
||
|
|
||
|
// TODO: Mark dirty builds within the version string
|