Skip to content

Commit c8814df

Browse files
authored
Merge pull request #175 from skycoin/develop
v1.0.0
2 parents 40b5d96 + 448614c commit c8814df

File tree

1,031 files changed

+182162
-13111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,031 files changed

+182162
-13111
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
.vscode
22
.DS_Store
3+
*.log
4+
*.out
5+
cert-cache
6+
*.ignore.*

Gopkg.lock

Lines changed: 143 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@
3030
version = "1.3.1"
3131

3232
[[constraint]]
33-
revision = "47885ab8702485be6b6f87a03d4f3be0bc5c982c"
33+
revision = "c7588cbf7690cd9f047a28efa2dcd8f2435a4e5e"
3434
name = "github.com/btcsuite/btcd"
3535

36-
[[constraint]]
37-
revision = "0d9ec835baeb9a8ce7fbe3eb7d7783284a089ced"
38-
name = "github.com/btcsuite/btcrpcclient"
39-
4036
[[override]]
4137
revision = "5ffa719c3882fd2ec1e8b9f4978066701c31a343"
4238
name = "github.com/btcsuite/btcutil"
@@ -51,8 +47,20 @@
5147

5248
[[constraint]]
5349
name = "github.com/skycoin/skycoin"
54-
version = "0.19.0"
50+
version = "v0.21.0"
5551

5652
[[constraint]]
5753
name = "github.com/stretchr/testify"
5854
version = "1.1.4"
55+
56+
[[constraint]]
57+
name = "github.com/sirupsen/logrus"
58+
version = "v1.0.3"
59+
60+
[[constraint]]
61+
name = "github.com/gz-c/logrus-prefixed-formatter"
62+
version = "v0.7.1"
63+
64+
[[constraint]]
65+
name = "github.com/gz-c/tollbooth"
66+
version = "v2.3.0"

Makefile

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
11
.DEFAULT_GOAL := help
2-
.PHONY: proxy teller install-skycoin-cli test lint check help
2+
.PHONY: teller test lint lint-fast check format cover help
33

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

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

10-
install-skycoin-cli: ## Install skycoin-cli
11-
go get github.com/skycoin/skycoin/cmd/cli
12-
@mv $$GOPATH/bin/cli $$GOPATH/bin/skycoin-cli
13-
149
test: ## Run tests
15-
go test ./cmd/...
16-
go test ./src/...
10+
go test ./cmd/... -timeout=1m -cover
11+
go test ./src/... -timeout=1m -cover
1712

18-
lint: ## Run linters
19-
gometalinter --disable-all -E goimports --tests --vendor ./...
13+
lint: ## Run linters. Use make install-linters first.
14+
vendorcheck ./...
15+
gometalinter --deadline=2m --disable-all -E goimports -E unparam --tests --vendor ./...
16+
17+
lint-fast: ## Run linters. Use make install-linters first. Skips slow linters.
2018
vendorcheck ./...
19+
gometalinter --disable-all -E goimports --tests --vendor ./...
2120

2221
check: lint test ## Run tests and linters
2322

23+
cover: ## Runs tests on ./src/ with HTML code coverage
24+
@echo "mode: count" > coverage-all.out
25+
$(foreach pkg,$(PACKAGES),\
26+
go test -coverprofile=coverage.out $(pkg);\
27+
tail -n +2 coverage.out >> coverage-all.out;)
28+
go tool cover -html=coverage-all.out
29+
2430
install-linters: ## Install linters
25-
go get -u -f github.com/golang/lint/golint
26-
go get -u -f golang.org/x/tools/cmd/goimports
27-
go get -u github.com/alecthomas/gometalinter
2831
go get -u github.com/FiloSottile/vendorcheck
32+
go get -u github.com/alecthomas/gometalinter
33+
gometalinter --vendored-linters --install
34+
35+
format: # Formats the code. Must have goimports installed (use make install-linters).
36+
# This sorts imports by [stdlib, 3rdpart, skycoin/skycoin, skycoin/teller]
37+
goimports -w -local github.com/skycoin/teller ./cmd
38+
goimports -w -local github.com/skycoin/teller ./src
39+
goimports -w -local github.com/skycoin/skycoin ./cmd
40+
goimports -w -local github.com/skycoin/skycoin ./src
2941

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

0 commit comments

Comments
 (0)