Version
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Kekskurse 2021-11-25 02:35:17 +01:00
parent be95054f69
commit f84f300488
Signed by: kekskurse
GPG Key ID: 728ACCB59341E7E4
3 changed files with 23 additions and 1 deletions

View File

@ -15,6 +15,8 @@ builds:
#- darwin
goarch:
- amd64
ldflags:
- -X main.version={{ .Version }}
archives:
- replacements:
darwin: Darwin

View File

@ -13,6 +13,10 @@ import (
//go:embed template/index.html
var s string
var (
version = "development"
)
var checkList []checks.Check
func init() {
@ -34,7 +38,7 @@ func main() {
panic(err)
}
t.Execute(writer, map[string]interface{}{"checks":res})
t.Execute(writer, map[string]interface{}{"checks":res, "version": version})
//writer.Write([]byte(s))
})

View File

@ -114,5 +114,21 @@
</div>
</div>
</div>
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-md-4 d-flex align-items-center">
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
<svg class="bi" width="30" height="24"><use xlink:href="#bootstrap"/></svg>
</a>
<span class="text-muted">Version: {{ .version }}</span>
</div>
<ul class="nav col-md-4 justify-content-end list-unstyled d-flex">
<li><a href="https://git.keks.cloud/kekskurse/http-server-status">Git/Source Code</a></li>
</ul>
</footer>
</div>
</body>
</html>