print version at the footer
This commit is contained in:
parent
99807b9722
commit
12614078ad
|
@ -18,6 +18,7 @@ pub struct Redis {
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct VersionData {
|
pub struct VersionData {
|
||||||
pub commit: String,
|
pub commit: String,
|
||||||
|
pub short_commit: String,
|
||||||
pub branch: String
|
pub branch: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@ impl Default for VersionData {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
VersionData {
|
VersionData {
|
||||||
commit: env!("COMMIT_HASH").to_string(),
|
commit: env!("COMMIT_HASH").to_string(),
|
||||||
|
short_commit: env!("COMMIT_HASH").to_string().chars().take(6).collect(),
|
||||||
branch: env!("COMMIT_BRANCH").to_string()
|
branch: env!("COMMIT_BRANCH").to_string()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,13 @@
|
||||||
<td>
|
<td>
|
||||||
<small>Made with Rust and <3</small>
|
<small>Made with Rust and <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'>
|
<ul style='margin:10px 0'>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://git.blek.codes/blek/bfile">
|
<a href="https://git.blek.codes/blek/bfile">
|
||||||
|
|
Loading…
Reference in New Issue