makefile cleanup

This commit is contained in:
rigel rozanski 2017-06-15 15:11:47 -04:00 committed by Ethan Frey
parent 3c18c33e92
commit e356fc1edb
3 changed files with 14 additions and 20 deletions

View File

@ -1,9 +1,8 @@
GOTOOLS = \
github.com/mitchellh/gox \
github.com/Masterminds/glide
GOTOOLS = github.com/mitchellh/gox \
github.com/Masterminds/glide
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
all: get_vendor_deps test install
all: get_vendor_deps install test
build:
go build ./cmd/...
@ -15,30 +14,25 @@ dist:
@bash scripts/dist.sh
@bash scripts/publish.sh
clitest/shunit2:
wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" \
-q -O clitest/shunit2
test: test_unit test_cli
test_cli: clitest/shunit2
# sudo apt-get install jq
@./clitest/basictx.sh
# @./clitest/ibc.sh
test:
test_unit:
go test $(PACKAGES)
#go run tests/tendermint/*.go
# get_deps:
# go get -d ./...
# update_deps:
# go get -d -u ./...
test_cli:
wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" \
-q -O tests/cli/shunit2
# sudo apt-get install jq
@./tests/cli/basictx.sh
# @./clitest/ibc.sh
get_vendor_deps: tools
glide install
build-docker:
docker run -it --rm -v "$(PWD):/go/src/github.com/tendermint/basecoin" -w "/go/src/github.com/tendermint/basecoin" -e "CGO_ENABLED=0" golang:alpine go build ./cmd/basecoin
docker run -it --rm -v "$(PWD):/go/src/github.com/tendermint/basecoin" -w \
"/go/src/github.com/tendermint/basecoin" -e "CGO_ENABLED=0" golang:alpine go build ./cmd/basecoin
docker build -t "tendermint/basecoin" .
tools:
@ -47,4 +41,4 @@ tools:
clean:
@rm -f ./basecoin
.PHONY: all build install test get_deps update_deps get_vendor_deps build-docker clean
.PHONY: all build install test test_cli test_unit get_vendor_deps build-docker clean