-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (46 loc) · 1.79 KB
/
Makefile
File metadata and controls
59 lines (46 loc) · 1.79 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# =================================================================
#
# Copyright (C) 2020 Spatial Current, Inc. - All Rights Reserved
# Released as open source under the MIT License. See LICENSE file.
#
# =================================================================
.PHONY: help
help: ## Print the help documentation
@grep -E '^[a-zA-Z_-\]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#
# Dependencies
#
.PHONY: deps_go
deps_go: ## Install Go dependencies
go get -d -t ./...
.PHONY: deps_go_test
deps_go_test: ## Download Go dependencies for tests
go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow # download shadow
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow # install shadow
go get -u github.com/kisielk/errcheck # download and install errcheck
go get -u github.com/client9/misspell/cmd/misspell # download and install misspell
go get -u github.com/gordonklaus/ineffassign # download and install ineffassign
go get -u honnef.co/go/tools/cmd/staticcheck # download and instal staticcheck
go get -u golang.org/x/tools/cmd/goimports # download and install goimports
deps_gopherjs: ## Install GopherJS
go get -u github.com/gopherjs/gopherjs
deps_javascript: ## Install dependencies for JavaScript tests
npm install .
#
# Go building, formatting, testing, and installing
#
.PHONY: fmt
fmt: ## Format Go source code
go fmt $$(go list ./... )
.PHONY: imports
imports: ## Update imports in Go source code
goimports -w -local github.com/spatialcurrent/go-deadline,github.com/spatialcurrent/ $$(find . -iname '*.go')
.PHONY: vet
vet: ## Vet Go source code
go vet $$(go list ./... )
.PHONY: test_go
test_go: ## Run Go tests
bash scripts/test.sh
## Clean
clean: ## Clean artifacts
rm -fr bin