From 10021eb65efb74e300887ce2025d41cb5d67269e Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sun, 10 Nov 2024 09:29:33 +0100 Subject: [PATCH] feat(goreleaser): set version on build via ldflags --- .goreleaser.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8f87b3f..3dba24b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,4 +1,5 @@ # vim: set ts=2 sw=2 tw=0 fo=cnqoj +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json version: 2 @@ -15,6 +16,8 @@ builds: - arm64 env: - CGO_ENABLED=0 + ldflags: + - -s -w -X {{.ModulePath}}/internal/metadata.ChronoTomatoVersion={{.Version}} upx: - enabled: true