From 37600d2cd0dff55a4802226dc220edf2064dd83d Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Tue, 20 Feb 2018 10:10:36 +0000 Subject: [PATCH 1/2] basecoin get_tools --- examples/basecoin/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/basecoin/Makefile b/examples/basecoin/Makefile index c617692a5..42244a90f 100644 --- a/examples/basecoin/Makefile +++ b/examples/basecoin/Makefile @@ -1,7 +1,10 @@ PACKAGES=$(shell go list ./... | grep -v '/vendor/') BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/examples/basecoin/version.GitCommit=`git rev-parse --short HEAD`" -all: get_vendor_deps build test +all: get_tools get_vendor_deps build test + +get_tools: + go get github.com/Masterminds/glide build: go build $(BUILD_FLAGS) -o build/basecoin ./cmd/... @@ -16,4 +19,4 @@ test: benchmark: @go test -bench=. $(PACKAGES) -.PHONY: build get_vendor_deps test benchmark +.PHONY: get_tools build get_vendor_deps test benchmark From 9ec5f37a0261add94513690ff8decb5ab63fa680 Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Tue, 20 Feb 2018 13:00:48 +0100 Subject: [PATCH 2/2] Fix installation process for basecoind from top-level folder The make build command only works if you install the dependencies first. Previously you had to cd into examples/basecoin and run get_vendor_deps and then cd into cosmos-sdk and then run build. With this change a user can just run build in the top-level folder and the dependencies are installed automatically. --- Makefile | 1 + examples/basecoin/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c5e0357cc..1f640bacb 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ gaia: build: @rm -rf examples/basecoin/vendor/ + cd examples/basecoin && $(MAKE) get_vendor_deps go build $(BUILD_FLAGS) -o build/basecoind ./examples/basecoin/cmd/basecoind/... dist: diff --git a/examples/basecoin/Makefile b/examples/basecoin/Makefile index 42244a90f..0196b9590 100644 --- a/examples/basecoin/Makefile +++ b/examples/basecoin/Makefile @@ -1,10 +1,10 @@ PACKAGES=$(shell go list ./... | grep -v '/vendor/') BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/examples/basecoin/version.GitCommit=`git rev-parse --short HEAD`" -all: get_tools get_vendor_deps build test +all: get_tools get_vendor_deps build test get_tools: - go get github.com/Masterminds/glide + go get github.com/tendermint/glide build: go build $(BUILD_FLAGS) -o build/basecoin ./cmd/... @@ -19,4 +19,4 @@ test: benchmark: @go test -bench=. $(PACKAGES) -.PHONY: get_tools build get_vendor_deps test benchmark +.PHONY: get_tools build get_vendor_deps test benchmark