Include git based version
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m29s

This commit is contained in:
2025-04-18 15:20:36 +02:00
parent d602220c4b
commit e9fe169a9a
9 changed files with 51 additions and 11 deletions

View File

@@ -1,2 +1,6 @@
#![feature(let_chains)]
pub mod context;
pub mod resources;
mod version;
pub use version::VERSION;

View File

@@ -1,6 +1,7 @@
use std::sync::Arc;
use std::time::Duration;
use authelia_controller::VERSION;
use authelia_controller::context::Context;
use authelia_controller::resources::AccessControlRule;
use color_eyre::eyre::Context as _;
@@ -39,7 +40,7 @@ async fn main() -> color_eyre::Result<()> {
})
.unwrap_or(Ok(15))?;
info!("Starting");
info!(version = VERSION, "Starting");
let client = Client::try_default().await?;
let access_control_rules = Api::<AccessControlRule>::all(client.clone());

11
src/version.rs Normal file
View 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")
}
}