From: Liu-Cheng Xu Date: Wed, 27 Sep 2017 07:09:47 +0000 (+0800) Subject: Update Makefile X-Git-Tag: v1.0.5~470^2~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0bc4a2230a55125b3354cf436e5531b10d90ce0e;p=bytom%2Fbytom.git Update Makefile - dump useless parts in Makefile - minor README update --- diff --git a/Makefile b/Makefile index 5dff4f36..e30e494c 100644 --- a/Makefile +++ b/Makefile @@ -1,80 +1,32 @@ -GOTOOLS = \ - github.com/mitchellh/gox \ - github.com/Masterminds/glide -PACKAGES=$(shell go list ./... | grep -v '/vendor/') -BUILD_TAGS?=bytom -TMHOME = $${TMHOME:-$$HOME/.bytom} +GOTOOLS = github.com/mitchellh/gox \ + github.com/Masterminds/glide +PACKAGES = $(shell go list ./... | grep -v '/vendor/') all: install test install: get_vendor_deps copy @go install --ldflags '-extldflags "-static"' \ --ldflags "-X github.com/Bytom/blockchain/version.GitCommit=`git rev-parse HEAD`" ./node/ - -build: copy - go build \ - --ldflags "-X github.com/Bytom/blockchain/version.GitCommit=`git rev-parse HEAD`" -o build/node ./node/ - -copy: - cp -r vendor/github.com/golang/crypto vendor/golang.org/x/crypto - cp -r vendor/github.com/golang/net vendor/golang.org/x/net - cp -r vendor/github.com/golang/text vendor/golang.org/x/text - cp -r vendor/github.com/golang/tools vendor/golang.org/x/tools - cp -r vendor/github.com/golang/time vendor/golang.org/x/time - -# dist builds binaries for all platforms and packages them for distribution -dist: - @BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'" - -test: - @echo "--> Running go test" - @go test $(PACKAGES) - -test_race: - @echo "--> Running go test --race" - @go test -v -race $(PACKAGES) - -test_integrations: - @bash ./test/test.sh - -test100: - @for i in {1..100}; do make test; done - -draw_deps: - # requires brew install graphviz or apt-get install graphviz - go get github.com/RobotsAndPencils/goviz - @goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png - -list_deps: - @go list -f '{{join .Deps "\n"}}' ./... | \ - grep -v /vendor/ | sort | uniq | \ - xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' - -get_deps: - @echo "--> Running go get" - @go get -v -d $(PACKAGES) - @go list -f '{{join .TestImports "\n"}}' ./... | \ - grep -v /vendor/ | sort | uniq | \ - xargs go get -v -d + @echo "====> Done!" get_vendor_deps: ensure_tools @rm -rf vendor/ - @echo "--> Running glide install" + @echo "====> Running glide install" @glide install -update_deps: tools - @echo "--> Updating dependencies" - @go get -d -u ./... - -revision: - -echo `git rev-parse --verify HEAD` > $(TMHOME)/revision - -echo `git rev-parse --verify HEAD` >> $(TMHOME)/revision_history - -tools: - go get -u -v $(GOTOOLS) - ensure_tools: go get $(GOTOOLS) +# In case of the terrible network condition +copy: + @cp -r vendor/github.com/golang/crypto vendor/golang.org/x/crypto + @cp -r vendor/github.com/golang/net vendor/golang.org/x/net + @cp -r vendor/github.com/golang/text vendor/golang.org/x/text + @cp -r vendor/github.com/golang/tools vendor/golang.org/x/tools + @cp -r vendor/github.com/golang/time vendor/golang.org/x/time + +test: + @echo "=====> Running go test" + @go test $(PACKAGES) -.PHONY: install build build_race dist test test_race test_integrations test100 draw_deps list_deps get_deps get_vendor_deps update_deps revision tools +.PHONY: install get_vendor_deps ensure_tools copy test diff --git a/README.md b/README.md index b0d2abdf..9c21f814 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Bytom [![AGPL v3](https://img.shields.io/badge/license-AGPL%20v3-brightgreen.svg)](./LICENSE) -Table of Contents +## Table of Contents * [What is Bytom?](#what-is-bytom) @@ -76,6 +76,8 @@ Currently, bytom is still in active development and a ton of work needs to be do ### Set up a wallet and manage the key +You can create an account via `create-key password`, which will generate a `keystore` file containing the keys under the project directory. + ```bash $ ./bytomcli create-key account_name password # Create an account named account_name using password $ ./bytomcli delete-key password pubkey # Delete account pubkey