print version at the footer
This commit is contained in:
parent
7bcc5e11b9
commit
62869da989
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in New Issue