Add release into startup
This commit is contained in:
parent
936b64f2a3
commit
822ac8ec68
|
|
@ -31,6 +31,8 @@ builds:
|
||||||
- goos: windows # Does anyone use Windows on arm64?
|
- goos: windows # Does anyone use Windows on arm64?
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
|
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,18 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
cfg *config.Config
|
cfg *config.Config
|
||||||
|
version = "dev"
|
||||||
|
commit = "nocommit"
|
||||||
|
date = "nodate"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.Info("OliveTin initializing")
|
log.WithFields(log.Fields{
|
||||||
|
"version": version,
|
||||||
|
"commit": commit,
|
||||||
|
"date": date,
|
||||||
|
}).Info("OliveTin initializing")
|
||||||
|
|
||||||
log.SetLevel(log.DebugLevel) // Default to debug, to catch cfg issues
|
log.SetLevel(log.DebugLevel) // Default to debug, to catch cfg issues
|
||||||
|
|
||||||
viper.AutomaticEnv()
|
viper.AutomaticEnv()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue