forked from skycoin/skywire-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 1.25 KB
/
Makefile
File metadata and controls
28 lines (23 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
lint: ## Run linters. Use make install-linters first.
GO111MODULE=off vendorcheck ./...
GO111MODULE=on golangci-lint run -c .golangci.yml ./...
# The govet version in golangci-lint is out of date and has spurious warnings, run it separately
GO111MODULE=on go vet -all ./...
install:
GO111MODULE=on go build -o ~/.skycoin/bin/skywire-updater ./cmd/skywire-updater
export PATH=$PATH:$HOME/.skycoin/bin
skywire-updater init-config
cp -R ./scripts ~/.skycoin/skywire-updater/scripts
install-linters: ## Install linters
GO111MODULE=on go get -u github.com/FiloSottile/vendorcheck
# For some reason this install method is not recommended, see https://github.com/golangci/golangci-lint#install
# However, they suggest `curl ... | bash` which we should not do
GO111MODULE=on go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
format: ## Formats the code. Must have goimports installed (use make install-linters).
GO111MODULE=on goimports -w -local github.com/watercompany/skywire-updater ./pkg
GO111MODULE=on goimports -w -local github.com/watercompany/skywire-updater ./cmd
dep: ## sorts dependencies
GO111MODULE=on go mod vendor -v
test: ## Run tests for net
@mkdir -p coverage/
GO111MODULE=on go test -race -tags no_ci -cover -timeout=5m ./pkg/...