diff --git a/.goreleaser.yml b/.goreleaser.yml index 42b4dd3..fb51e6f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,6 +15,8 @@ builds: #- darwin goarch: - amd64 + ldflags: + - -X main.version={{ .Version }} archives: - replacements: darwin: Darwin diff --git a/main.go b/main.go index 334366e..890b932 100644 --- a/main.go +++ b/main.go @@ -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)) }) diff --git a/template/index.html b/template/index.html index 8926a35..cdbfcb8 100644 --- a/template/index.html +++ b/template/index.html @@ -114,5 +114,21 @@ + + +