print version at the footer

This commit is contained in:
blek 2023-10-29 19:44:31 +10:00
parent 7bcc5e11b9
commit 62869da989
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,7 @@ pub struct Redis {
#[derive(Debug, Clone)]
pub struct VersionData {
pub commit: String,
pub short_commit: String,
pub branch: String
}
@ -25,6 +26,7 @@ impl Default for VersionData {
fn default() -> Self {
VersionData {
commit: env!("COMMIT_HASH").to_string(),
short_commit: env!("COMMIT_HASH").to_string().chars().take(6).collect(),
branch: env!("COMMIT_BRANCH").to_string()
}
}

View File

@ -66,6 +66,13 @@
<tr>
<td>
<small>Made with Rust and &lt;3</small>
<small style="display:block">
Version
<a href="https://git.blek.codes/blek/bfile/commit/{{ env.version.commit }}" target="_blank">
{{ env!("CARGO_PKG_VERSION") }} ({{ env.version.branch -}}/{{- env.version.short_commit }})
</a>
</small>
<ul style='margin:10px 0'>
<li>