2017-06-15 12:11:47 -07:00
|
|
|
GOTOOLS = github.com/mitchellh/gox \
|
|
|
|
github.com/Masterminds/glide
|
2016-02-05 23:16:33 -08:00
|
|
|
|
2017-06-15 12:11:47 -07:00
|
|
|
all: get_vendor_deps install test
|
2017-01-28 09:29:32 -08:00
|
|
|
|
|
|
|
build:
|
2017-03-16 00:43:46 -07:00
|
|
|
go build ./cmd/...
|
2017-01-28 09:29:32 -08:00
|
|
|
|
|
|
|
install:
|
2017-03-16 00:43:46 -07:00
|
|
|
go install ./cmd/...
|
2017-06-18 16:01:54 -07:00
|
|
|
go install ./docs/guide/counter/cmd/...
|
2016-02-05 23:16:33 -08:00
|
|
|
|
2017-06-01 20:51:35 -07:00
|
|
|
dist:
|
2017-06-02 09:06:48 -07:00
|
|
|
@bash scripts/dist.sh
|
|
|
|
@bash scripts/publish.sh
|
2017-06-01 20:51:35 -07:00
|
|
|
|
2017-06-15 12:11:47 -07:00
|
|
|
test: test_unit test_cli
|
2017-06-15 08:16:00 -07:00
|
|
|
|
2017-06-15 12:11:47 -07:00
|
|
|
test_unit:
|
2017-06-19 05:16:38 -07:00
|
|
|
go test `glide novendor`
|
2017-01-13 12:29:12 -08:00
|
|
|
#go run tests/tendermint/*.go
|
2016-02-05 23:16:33 -08:00
|
|
|
|
2017-06-16 04:56:12 -07:00
|
|
|
test_cli: tests/cli/shunit2
|
2017-06-15 12:11:47 -07:00
|
|
|
# sudo apt-get install jq
|
|
|
|
@./tests/cli/basictx.sh
|
2017-06-15 12:43:09 -07:00
|
|
|
@./tests/cli/counter.sh
|
2017-06-20 04:52:32 -07:00
|
|
|
@./tests/cli/restart.sh
|
2017-06-16 08:10:45 -07:00
|
|
|
@./tests/cli/ibc.sh
|
2017-01-11 21:07:56 -08:00
|
|
|
|
2017-06-02 09:06:48 -07:00
|
|
|
get_vendor_deps: tools
|
2017-01-11 21:07:56 -08:00
|
|
|
glide install
|
2017-01-28 09:29:32 -08:00
|
|
|
|
2017-03-14 00:25:42 -07:00
|
|
|
build-docker:
|
2017-06-15 12:11:47 -07:00
|
|
|
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
|
2017-03-14 00:25:42 -07:00
|
|
|
docker build -t "tendermint/basecoin" .
|
|
|
|
|
2017-06-16 04:56:12 -07:00
|
|
|
tests/cli/shunit2:
|
|
|
|
wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" \
|
|
|
|
-q -O tests/cli/shunit2
|
|
|
|
|
2017-06-02 09:06:48 -07:00
|
|
|
tools:
|
2017-06-21 11:13:54 -07:00
|
|
|
@go get $(GOTOOLS)
|
2017-06-02 09:06:48 -07:00
|
|
|
|
2017-03-14 00:25:42 -07:00
|
|
|
clean:
|
2017-06-19 05:16:38 -07:00
|
|
|
# maybe cleaning up cache and vendor is overkill, but sometimes
|
|
|
|
# you don't get the most recent versions with lots of branches, changes, rebases...
|
|
|
|
@rm -rf ~/.glide/cache/src/https-github.com-tendermint-*
|
|
|
|
@rm -rf ./vendor
|
|
|
|
@rm -f $GOPATH/bin/{basecoin,basecli,counter,countercli}
|
2017-03-14 00:25:42 -07:00
|
|
|
|
2017-06-19 05:16:38 -07:00
|
|
|
# when your repo is getting a little stale... just make fresh
|
|
|
|
fresh: clean get_vendor_deps install
|
|
|
|
@if [[ `git status -s` ]]; then echo; echo "Warning: uncommited changes"; git status -s; fi
|
|
|
|
|
|
|
|
.PHONY: all build install test test_cli test_unit get_vendor_deps build-docker clean fresh
|