diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 673e0a8..881a8ce 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -11,6 +11,9 @@ builds: - linux - windows - darwin + ldflags: + - -s -w + - -X 'git.ostiwe.com/ostiwe-com/status/version/version.ApplicationVersion={{.Tag}}' archives: - formats: [tar.gz] diff --git a/version/version.go b/version/version.go index b442223..1a08266 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,7 @@ package version +var ApplicationVersion string = "dev" // These value will be injected at build time, DO NOT EDIT. + func AppVersion() string { - return "1.0.1" + return ApplicationVersion }