Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile cleanup #110

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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/...
Expand All @@ -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_cli: clitest/shunit2
# sudo apt-get install jq
@./clitest/basictx.sh
# @./clitest/ibc.sh
test: test_unit test_cli

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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:

test:
override:
- "cd $REPO && glide install && go install ./cmd/basecoin"
- "cd $REPO && glide install && go install ./cmd/..."
- ls $GOPATH/bin
- "cd $REPO && make test"
- "cd $REPO/demo && bash start.sh"
Expand Down
File renamed without changes.
File renamed without changes.