Skip to content

Commit

Permalink
Merge pull request #175 from skycoin/develop
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
gz-c authored Dec 15, 2017
2 parents 40b5d96 + 448614c commit c8814df
Show file tree
Hide file tree
Showing 1,031 changed files with 182,162 additions and 13,111 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.vscode
.DS_Store
*.log
*.out
cert-cache
*.ignore.*
165 changes: 143 additions & 22 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@
version = "1.3.1"

[[constraint]]
revision = "47885ab8702485be6b6f87a03d4f3be0bc5c982c"
revision = "c7588cbf7690cd9f047a28efa2dcd8f2435a4e5e"
name = "github.com/btcsuite/btcd"

[[constraint]]
revision = "0d9ec835baeb9a8ce7fbe3eb7d7783284a089ced"
name = "github.com/btcsuite/btcrpcclient"

[[override]]
revision = "5ffa719c3882fd2ec1e8b9f4978066701c31a343"
name = "github.com/btcsuite/btcutil"
Expand All @@ -51,8 +47,20 @@

[[constraint]]
name = "github.com/skycoin/skycoin"
version = "0.19.0"
version = "v0.21.0"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "v1.0.3"

[[constraint]]
name = "github.com/gz-c/logrus-prefixed-formatter"
version = "v0.7.1"

[[constraint]]
name = "github.com/gz-c/tollbooth"
version = "v2.3.0"
42 changes: 27 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
.DEFAULT_GOAL := help
.PHONY: proxy teller install-skycoin-cli test lint check help
.PHONY: teller test lint lint-fast check format cover help

proxy: ## Run the teller proxy. To add arguments, do 'make ARGS="--foo" proxy'.
go run cmd/proxy/proxy.go ${ARGS}
PACKAGES = $(shell find ./src -type d -not -path '\./src')

teller: SKYCOIN-CLI-exists ## Run teller. To add arguments, do 'make ARGS="--foo" teller'.
teller: ## Run teller. To add arguments, do 'make ARGS="--foo" teller'.
go run cmd/teller/teller.go ${ARGS}

install-skycoin-cli: ## Install skycoin-cli
go get github.com/skycoin/skycoin/cmd/cli
@mv $$GOPATH/bin/cli $$GOPATH/bin/skycoin-cli

test: ## Run tests
go test ./cmd/...
go test ./src/...
go test ./cmd/... -timeout=1m -cover
go test ./src/... -timeout=1m -cover

lint: ## Run linters
gometalinter --disable-all -E goimports --tests --vendor ./...
lint: ## Run linters. Use make install-linters first.
vendorcheck ./...
gometalinter --deadline=2m --disable-all -E goimports -E unparam --tests --vendor ./...

lint-fast: ## Run linters. Use make install-linters first. Skips slow linters.
vendorcheck ./...
gometalinter --disable-all -E goimports --tests --vendor ./...

check: lint test ## Run tests and linters

cover: ## Runs tests on ./src/ with HTML code coverage
@echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES),\
go test -coverprofile=coverage.out $(pkg);\
tail -n +2 coverage.out >> coverage-all.out;)
go tool cover -html=coverage-all.out

install-linters: ## Install linters
go get -u -f github.com/golang/lint/golint
go get -u -f golang.org/x/tools/cmd/goimports
go get -u github.com/alecthomas/gometalinter
go get -u github.com/FiloSottile/vendorcheck
go get -u github.com/alecthomas/gometalinter
gometalinter --vendored-linters --install

format: # Formats the code. Must have goimports installed (use make install-linters).
# This sorts imports by [stdlib, 3rdpart, skycoin/skycoin, skycoin/teller]
goimports -w -local github.com/skycoin/teller ./cmd
goimports -w -local github.com/skycoin/teller ./src
goimports -w -local github.com/skycoin/skycoin ./cmd
goimports -w -local github.com/skycoin/skycoin ./src

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Loading

0 comments on commit c8814df

Please sign in to comment.