Skip to content

Commit

Permalink
Merge pull request #411 from grafana/fix-release-version
Browse files Browse the repository at this point in the history
Fixes goreleaser version in binary
  • Loading branch information
cyriltovena authored Nov 7, 2022
2 parents 06f6d6d + 98b25cd commit da9ab18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ builds:
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Env.GIT_BRANCH }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Env.IMAGE_TAG }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .Env.GIT_REVISION }}"
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .Env.GIT_LAST_COMMIT_DATE }}"
id: phlare
- env:
Expand All @@ -36,9 +36,9 @@ builds:
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Env.GIT_BRANCH }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Env.IMAGE_TAG }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .Env.GIT_REVISION }}"
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .Env.GIT_LAST_COMMIT_DATE }}"
goos:
- linux
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ IMAGE_TAG ?= $(shell ./tools/image-tag)
GIT_REVISION := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_LAST_COMMIT_DATE := $(shell git log -1 --date=iso-strict --format=%cd)
GORELEASER_ENV := GIT_BRANCH=$(GIT_BRANCH) GIT_REVISION=$(GIT_REVISION) GIT_LAST_COMMIT_DATE=$(GIT_LAST_COMMIT_DATE) IMAGE_TAG=$(IMAGE_TAG)
GORELEASER_ENV := GIT_LAST_COMMIT_DATE=$(GIT_LAST_COMMIT_DATE)

# Build flags
VPREFIX := github.com/grafana/phlare/pkg/util/build
Expand Down

0 comments on commit da9ab18

Please sign in to comment.