Commit d97c1a20 authored by Peter Mrekaj's avatar Peter Mrekaj Committed by GitHub

fix: commit hash for bee version (#2285)

parent 48d21c4a
...@@ -11,7 +11,7 @@ builds: ...@@ -11,7 +11,7 @@ builds:
- -v - -v
- -trimpath - -trimpath
ldflags: ldflags:
- -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commit={{.ShortCommit}} -X github.com/ethersphere/bee.commitTime={{.CommitTimestamp}} - -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commitHash={{.ShortCommit}} -X github.com/ethersphere/bee.commitTime={{.CommitTimestamp}}
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
goos: goos:
......
...@@ -9,10 +9,10 @@ BEEKEEPER_CLUSTER ?= local ...@@ -9,10 +9,10 @@ BEEKEEPER_CLUSTER ?= local
BEELOCAL_BRANCH ?= main BEELOCAL_BRANCH ?= main
BEEKEEPER_BRANCH ?= master BEEKEEPER_BRANCH ?= master
COMMIT ?= "$(shell git describe --long --dirty --always --match "" || true)" COMMIT_HASH ?= "$(shell git describe --long --dirty --always --match "" || true)"
CLEAN_COMMIT ?= "$(shell git describe --long --always --match "" || true)" CLEAN_COMMIT ?= "$(shell git describe --long --always --match "" || true)"
COMMIT_TIME ?= "$(shell git show -s --format=%ct $(CLEAN_COMMIT) || true)" COMMIT_TIME ?= "$(shell git show -s --format=%ct $(CLEAN_COMMIT) || true)"
LDFLAGS ?= -s -w -X github.com/ethersphere/bee.commit="$(COMMIT)" -X github.com/ethersphere/bee.commitTime="$(COMMIT_TIME)" LDFLAGS ?= -s -w -X github.com/ethersphere/bee.commitHash="$(COMMIT_HASH)" -X github.com/ethersphere/bee.commitTime="$(COMMIT_TIME)"
.PHONY: all .PHONY: all
all: build lint vet test-race binary all: build lint vet test-race binary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment