Skip to content

Commit

Permalink
Improve version logging and showing
Browse files Browse the repository at this point in the history
Signed-off-by: Jo Vandeginste <[email protected]>
  • Loading branch information
jovandeginste committed Feb 22, 2024
1 parent 76c7a96 commit a28bcce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func newLogger() slog.Handler {

func NewApp(version Version) *App {
logger := slog.New(newLogger()).
With("app", "workout-tracker", "version", version)
With("app", "workout-tracker", "version", version.RefName, "sha", version.Sha)

a := &App{
rawLogger: logger,
Expand Down
1 change: 1 addition & 0 deletions views/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Workout Tracker{{ with .version }},
<a
target="_blank"
title="Build time: {{ .BuildTime }}"
href="https://github.com/jovandeginste/workout-tracker/tree/{{ .RefName }}"
>
{{ if eq .RefType "branch" }}{{ .RefType }} {{ end }}{{ .RefName }} ({{
Expand Down

0 comments on commit a28bcce

Please sign in to comment.