Skip to content

Commit

Permalink
Problem: Version CLI command doesn't output any text
Browse files Browse the repository at this point in the history
Closes: #177

Solution:
- add ldflags to Makefile, goreleaser version is good
  • Loading branch information
yihuang committed Oct 15, 2021
1 parent 9426981 commit 766904e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ LEDGER_ENABLED ?= true

TESTNET_FLAGS ?=

VERSION := $(shell echo $(shell git describe --tags 2>/dev/null ) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
NETWORK ?= mainnet
COVERAGE ?= coverage.txt
BUILDDIR ?= $(CURDIR)/build
LEDGER_ENABLED ?= true

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=cronos \
-X github.com/cosmos/cosmos-sdk/version.ServerName=cronosd \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)

BUILD_FLAGS := -ldflags '$(ldflags)'

BUILD_TAGS := -tags
ifeq ($(NETWORK),mainnet)
BUILD_TAGS := $(BUILD_TAGS) mainnet
Expand Down

0 comments on commit 766904e

Please sign in to comment.