From c115a83028a1def347e2722887bf69c87317670a Mon Sep 17 00:00:00 2001 From: Mircea-Pavel Anton Date: Fri, 20 Dec 2024 01:16:21 +0200 Subject: [PATCH] fix(goreleaser): Version and Git SHA not properly passed in (#150) * fix(goreleaser): Version and Git SHA not properly passed in * try lowercase? * try using default ldflags --- .goreleaser.yaml | 2 +- main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2d369cc..bb21647 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -15,7 +15,7 @@ builds: - linux - darwin ldflags: - - -s -w -X github.com/mirceanton/{{.ProjectName}}/cmd.version={{.Version}} + - -s -w archives: - format: tar.gz diff --git a/main.go b/main.go index 476776a..c342917 100644 --- a/main.go +++ b/main.go @@ -10,15 +10,15 @@ import ( ) var ( - Version = "local" - Gitsha = "?" + version = "dev" + commit = "none" ) func main() { logging.Init() log.Infof("starting external-dns-provider-mikrotik") - log.Infof("version: %s (%s)", Version, Gitsha) + log.Infof("version: %s (%s)", version, commit) config := configuration.Init() provider, err := dnsprovider.Init(config)