diff --git a/Makefile b/Makefile index b8cdbbed85f4..0b8c041a9dbc 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,11 @@ VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') COMMIT := $(shell git log -1 --format='%H') BUILD_TAGS = netgo CAT := $(if $(filter $(OS),Windows_NT),type,cat) -BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags \ - "-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \ - -X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \ - -X github.com/cosmos/cosmos-sdk/version.VendorDirHash=$(shell $(CAT) vendor-deps)" +BUILD_FLAGS = -tags "$(BUILD_TAGS)" -ldflags \ + '-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ + -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ + -X github.com/cosmos/cosmos-sdk/version.VendorDirHash=$(shell $(CAT) vendor-deps) \ + -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(BUILD_TAGS)"' LEDGER_ENABLED ?= true GOTOOLS = \ github.com/golang/dep/cmd/dep \ diff --git a/PENDING.md b/PENDING.md index a41bbe0ca3d8..28daa24ef61f 100644 --- a/PENDING.md +++ b/PENDING.md @@ -34,6 +34,9 @@ IMPROVEMENTS * Gaia * SDK + * [\#3604] Improve SDK funds related error messages and allow for unicode in + JSON ABCI log. + * [\#3620](https://github.com/cosmos/cosmos-sdk/pull/3620) Version command shows build tags * Tendermint * [\#3618] Upgrade to Tendermint 0.30.03 diff --git a/docs/gaia/installation.md b/docs/gaia/installation.md index 84b4f92697bd..af2791750542 100644 --- a/docs/gaia/installation.md +++ b/docs/gaia/installation.md @@ -36,10 +36,29 @@ make tools install That will install the `gaiad` and `gaiacli` binaries. Verify that everything is OK: ```bash -$ gaiad version -$ gaiacli version +$ gaiad version --long +$ gaiacli version --long ``` +`gaiacli` for instance should output something similar to: + +``` +cosmos-sdk: 0.31.2-10-g1fba7308 +git commit: 1fba7308fa226e971964cd6baad9527d4b51d9fc +vendor hash: 1aec7edfad9888a967b3e9063e42f66b28f447e6 +build tags: netgo ledger +go version go1.11.5 linux/amd64 +``` + +##### Build Tags + +Build tags indicate special features that have been enabled in the binary. + +| Build Tag | Description | +| --------- | ----------------------------------------------- | +| netgo | Name resolution will use pure Go code | +| ledger | Ledger devices are supported (hardware wallets) | + ### Next Now you can [join the public testnet](./join-testnet.md) or [create you own testnet](./deploy-testnet.md) diff --git a/version/version.go b/version/version.go index 6affcfbd4978..0b2c09985a6f 100644 --- a/version/version.go +++ b/version/version.go @@ -11,12 +11,14 @@ var ( Commit = "" Version = "" VendorDirHash = "" + BuildTags = "" ) type versionInfo struct { CosmosSDK string `json:"cosmos_sdk"` GitCommit string `json:"commit"` VendorDirHash string `json:"vendor_hash"` + BuildTags string `json:"build_tags"` GoVersion string `json:"go"` } @@ -24,11 +26,15 @@ func (v versionInfo) String() string { return fmt.Sprintf(`cosmos-sdk: %s git commit: %s vendor hash: %s -%s`, v.CosmosSDK, v.GitCommit, v.VendorDirHash, v.GoVersion) +build tags: %s +%s`, v.CosmosSDK, v.GitCommit, v.VendorDirHash, v.BuildTags, v.GoVersion) } func newVersionInfo() versionInfo { return versionInfo{ - Version, Commit, VendorDirHash, fmt.Sprintf("go version %s %s/%s\n", - runtime.Version(), runtime.GOOS, runtime.GOARCH)} + Version, + Commit, + VendorDirHash, + BuildTags, + fmt.Sprintf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)} }