Skip to content

Commit

Permalink
Merge pull request #242 from cosmos/feature/move_to_examples
Browse files Browse the repository at this point in the history
Move all binaries to examples
  • Loading branch information
ethanfrey authored Sep 4, 2017
2 parents 9ca7ad2 + 2887d0d commit c94500f
Show file tree
Hide file tree
Showing 40 changed files with 2,348 additions and 147 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ vendor
.vagrant
merkleeyes.db
build
shunit2
docs/guide/*.sh
keys/
39 changes: 15 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@ GOTOOLS = github.com/mitchellh/gox \
github.com/rigelrozanski/shelldown/cmd/shelldown
TUTORIALS=$(shell find docs/guide -name "*md" -type f)

EXAMPLES := counter eyes basecoin
INSTALL_EXAMPLES := $(addprefix install_,${EXAMPLES})
TEST_EXAMPLES := $(addprefix testex_,${EXAMPLES})

LINKER_FLAGS:="-X github.com/cosmos/cosmos-sdk/client/commands.CommitHash=`git rev-parse --short HEAD`"

all: get_vendor_deps install test

build:
@go build ./cmd/...

install:
$(INSTALL_EXAMPLES): install_%:
cd ./examples/$* && make install

$(TEST_EXAMPLES): testex_%:
cd ./examples/$* && make test_cli

install: $(INSTALL_EXAMPLES)
@go install -ldflags $(LINKER_FLAGS) ./cmd/...
@go install -ldflags $(LINKER_FLAGS) ./docs/guide/counter/cmd/...

dist:
@bash publish/dist.sh
Expand All @@ -26,35 +35,17 @@ test: test_unit test_cli

test_unit:
@go test `glide novendor`
#go run tests/tendermint/*.go

test_cli: tests/cli/shunit2
test_cli: $(TEST_EXAMPLES)
# sudo apt-get install jq
./tests/cli/keys.sh
./tests/cli/rpc.sh
./tests/cli/init.sh
./tests/cli/basictx.sh
./tests/cli/eyes.sh
./tests/cli/roles.sh
./tests/cli/counter.sh
./tests/cli/restart.sh
./tests/cli/rest.sh
./tests/cli/ibc.sh

test_tutorial: docs/guide/shunit2
# wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2"

test_tutorial:
@shelldown ${TUTORIALS}
@for script in docs/guide/*.sh ; do \
bash $$script ; \
done

tests/cli/shunit2:
@wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" \
-q -O tests/cli/shunit2

docs/guide/shunit2:
@wget "https://raw.githubusercontent.com/kward/shunit2/master/source/2.1/src/shunit2" \
-q -O docs/guide/shunit2

get_vendor_deps: tools
@glide install

Expand Down
8 changes: 0 additions & 8 deletions cmd/basecoin/commands/ibc.go

This file was deleted.

43 changes: 0 additions & 43 deletions cmd/basecoin/commands/root.go

This file was deleted.

Loading

0 comments on commit c94500f

Please sign in to comment.