Include git based version
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m29s
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m29s
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
#![feature(let_chains)]
|
||||
pub mod context;
|
||||
pub mod resources;
|
||||
mod version;
|
||||
|
||||
pub use version::VERSION;
|
||||
|
||||
@@ -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
11
src/version.rs
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user