Skip to content

Commit

Permalink
Merge 5266675 into 1986dc5
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck authored Mar 12, 2020
2 parents 1986dc5 + 5266675 commit 3c69833
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ script:
- gotest -v -covermode=count -coverprofile=coverage.out ./x/...
- $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci
- ls -l $GOPATH/bin

30 changes: 18 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGES=$(shell go list ./... | grep -v '/simulation')

VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
VERSION := $(shell echo $(shell git describe --tags --dirty) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
COSMOS_SDK := $(shell grep -i cosmos-sdk go.mod | awk '{print $$2}')

Expand All @@ -16,27 +16,33 @@ build_tags_comma_sep := $(patsubst $(whitespace),$(comma),$(build_tags))
coverage := $(shell mktemp -u).coverage.out

# process linker flags

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=BluzelleService \
LDFLAGS = -X github.com/cosmos/cosmos-sdk/version.Name=BluzelleService \
-X github.com/cosmos/cosmos-sdk/version.ServerName=blzd \
-X github.com/cosmos/cosmos-sdk/version.ClientName=blzcli \
-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.BuildTags=$(build_tags_comma_sep),faucet,cosmos-sdk $(COSMOS_SDK)"
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)

BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' -tags faucet
LDFLAGS_FAUCET = -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep),faucet,cosmos-sdk $(COSMOS_SDK)"
LDFLAGS_NO_FAUCET = -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep),cosmos-sdk $(COSMOS_SDK)"

all:
go build $(BUILD_FLAGS) ./cmd/blzd
go build $(BUILD_FLAGS) ./cmd/blzcli
BUILD_FLAGS := -tags "$(build_tags)"

install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/blzd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/blzcli
all:
go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzd
go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzcli

clean:
@rm -f blzd blzcli

mainnet: go.sum
go install -mod=readonly $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzd
go install -mod=readonly $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzcli

testnet:
# only testnet has the faucet enabled...
go install -mod=readonly $(BUILD_FLAGS) -tags "faucet" -ldflags '$(LDFLAGS) $(LDFLAGS_FAUCET)' ./cmd/blzd
go install -mod=readonly $(BUILD_FLAGS) -tags "faucet" -ldflags '$(LDFLAGS) $(LDFLAGS_FAUCET)' ./cmd/blzcli

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify
Expand Down
6 changes: 5 additions & 1 deletion x/crud/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ func (am AppModule) Route() string {
}

func (am AppModule) NewHandler() sdk.Handler {
return NewHandler(am.keeper)
if !am.crudDisabled {
return NewHandler(am.keeper)
} else {
return nil
}
}

func (am AppModule) QuerierRoute() string {
Expand Down

0 comments on commit 3c69833

Please sign in to comment.