Skip to content

Commit

Permalink
Merge 7843cb4 into 1986dc5
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck committed Mar 12, 2020
2 parents 1986dc5 + 7843cb4 commit f6d283d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 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

28 changes: 18 additions & 10 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,35 @@ 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)

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)"

BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' -tags faucet
BUILD_FLAGS := -tags "$(build_tags)"

all:
go build $(BUILD_FLAGS) ./cmd/blzd
go build $(BUILD_FLAGS) ./cmd/blzcli
go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzd
go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_NO_FAUCET)' ./cmd/blzcli

install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/blzd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/blzcli
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

clean:
@rm -f blzd blzcli

mainnet: install

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 f6d283d

Please sign in to comment.