diff --git a/.goreleaser.yml b/.goreleaser.yml index 9e26e592582..88bf9d55c85 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,11 +15,11 @@ builds: - -trimpath ldflags: - -s -w - - -X github.com/ethersphere/bee.version={{ .Version }} - - -X github.com/ethersphere/bee.commitHash={{ .ShortCommit }} - - -X github.com/ethersphere/bee.commitTime={{ .CommitTimestamp }} - - -X github.com/ethersphere/bee/pkg/api.Version={{ .Env.BEE_API_VERSION }} - - -X github.com/ethersphere/bee/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} + - -X github.com/ethersphere/bee/v2.version={{ .Version }} + - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} + - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} + - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} + - -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} env: - CGO_ENABLED=0 goos: @@ -39,11 +39,11 @@ builds: - -trimpath ldflags: - -s -w - - -X github.com/ethersphere/bee.version={{ .Version }} - - -X github.com/ethersphere/bee.commitHash={{ .ShortCommit }} - - -X github.com/ethersphere/bee.commitTime={{ .CommitTimestamp }} - - -X github.com/ethersphere/bee/pkg/api.Version={{ .Env.BEE_API_VERSION }} - - -X github.com/ethersphere/bee/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} + - -X github.com/ethersphere/bee/v2.version={{ .Version }} + - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} + - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} + - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} + - -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} env: - CGO_ENABLED=0 goos: @@ -65,11 +65,11 @@ builds: - -trimpath ldflags: - -s -w - - -X github.com/ethersphere/bee.version={{ .Version }} - - -X github.com/ethersphere/bee.commitHash={{ .ShortCommit }} - - -X github.com/ethersphere/bee.commitTime={{ .CommitTimestamp }} - - -X github.com/ethersphere/bee/pkg/api.Version={{ .Env.BEE_API_VERSION }} - - -X github.com/ethersphere/bee/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} + - -X github.com/ethersphere/bee/v2.version={{ .Version }} + - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} + - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} + - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} + - -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} env: - CGO_ENABLED=0 goos: @@ -85,11 +85,11 @@ builds: - -trimpath ldflags: - -s -w - - -X github.com/ethersphere/bee.version={{ .Version }} - - -X github.com/ethersphere/bee.commitHash={{ .ShortCommit }} - - -X github.com/ethersphere/bee.commitTime={{ .CommitTimestamp }} - - -X github.com/ethersphere/bee/pkg/api.Version={{ .Env.BEE_API_VERSION }} - - -X github.com/ethersphere/bee/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} + - -X github.com/ethersphere/bee/v2.version={{ .Version }} + - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} + - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} + - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} + - -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} env: - CGO_ENABLED=0 goos: @@ -104,11 +104,11 @@ builds: - -trimpath ldflags: - -s -w - - -X github.com/ethersphere/bee.version={{ .Version }} - - -X github.com/ethersphere/bee.commitHash={{ .ShortCommit }} - - -X github.com/ethersphere/bee.commitTime={{ .CommitTimestamp }} - - -X github.com/ethersphere/bee/pkg/api.Version={{ .Env.BEE_API_VERSION }} - - -X github.com/ethersphere/bee/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} + - -X github.com/ethersphere/bee/v2.version={{ .Version }} + - -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }} + - -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }} + - -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }} + - -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }} env: - CGO_ENABLED=0 goos: diff --git a/Makefile b/Makefile index f245354331c..46da4995b14 100644 --- a/Makefile +++ b/Makefile @@ -20,13 +20,13 @@ COMMIT_HASH ?= "$(shell git describe --long --dirty --always --match "" || true) CLEAN_COMMIT ?= "$(shell git describe --long --always --match "" || true)" COMMIT_TIME ?= "$(shell git show -s --format=%ct $(CLEAN_COMMIT) || true)" LDFLAGS ?= -s -w \ --X github.com/ethersphere/bee.version="$(VERSION)" \ --X github.com/ethersphere/bee.commitHash="$(COMMIT_HASH)" \ --X github.com/ethersphere/bee.commitTime="$(COMMIT_TIME)" \ --X github.com/ethersphere/bee/pkg/api.Version="$(BEE_API_VERSION)" \ --X github.com/ethersphere/bee/pkg/api.DebugVersion="$(BEE_DEBUG_API_VERSION)" \ --X github.com/ethersphere/bee/pkg/p2p/libp2p.reachabilityOverridePublic="$(REACHABILITY_OVERRIDE_PUBLIC)" \ --X github.com/ethersphere/bee/pkg/postage/listener.batchFactorOverridePublic="$(BATCHFACTOR_OVERRIDE_PUBLIC)" +-X github.com/ethersphere/bee/v2.version="$(VERSION)" \ +-X github.com/ethersphere/bee/v2.commitHash="$(COMMIT_HASH)" \ +-X github.com/ethersphere/bee/v2.commitTime="$(COMMIT_TIME)" \ +-X github.com/ethersphere/bee/v2/pkg/api.Version="$(BEE_API_VERSION)" \ +-X github.com/ethersphere/bee/v2/pkg/api.DebugVersion="$(BEE_DEBUG_API_VERSION)" \ +-X github.com/ethersphere/bee/v2/pkg/p2p/libp2p.reachabilityOverridePublic="$(REACHABILITY_OVERRIDE_PUBLIC)" \ +-X github.com/ethersphere/bee/v2/pkg/postage/listener.batchFactorOverridePublic="$(BATCHFACTOR_OVERRIDE_PUBLIC)" .PHONY: all all: build lint test-race binary