Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Fixes goreleaser version in binary #411

Merged
merged 1 commit into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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