Skip to content

Commit

Permalink
Show version information on startup (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
xperimental authored Oct 13, 2024
1 parent 1d5a134 commit d0b3417
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func main() {
}
log.SetLevel(logrus.Level(cfg.LogLevel))

log.Infof("netatmo-exporter %s (commit: %s)", Version, GitCommit)
client := netatmo.NewClient(cfg.Netatmo)

if cfg.TokenFile != "" {
Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

var (
// Version contains the version as set during the build.
Version = ""
Version = "unknown"

// GitCommit contains the git commit hash set during the build.
GitCommit = ""
GitCommit = "unknown"
)

func versionHandler(log logrus.FieldLogger) http.Handler {
Expand Down

0 comments on commit d0b3417

Please sign in to comment.