Skip to content

Commit

Permalink
fix: ensure that the "os" keyring version.Name is alphanumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Dec 15, 2020
1 parent 93abadf commit 964e117
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion golang/cosmos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ whitespace += $(whitespace)
comma := ,
build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

# Note that the version.Name must be alphanumeric only.
# Otherwise, generated "os" keyrings on Ubuntu 20.04 can't be read.
VersionName := $(shell echo "$(NAME)" | sed -e 's/[^A-Za-z0-9]//g')

# process linker flags
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(NAME) \
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(VersionName) \
-X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-server \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
Expand Down

0 comments on commit 964e117

Please sign in to comment.