forked from mcdafydd/go-azuredevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (48 loc) · 1.19 KB
/
Makefile
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
.DEFAULT_GOAL := explain
.PHONY: explain
explain:
### Welcome
#
# Makefile for go-azuredevops
#
# _____
# | __|___
# | | | . |
# |_____|___|
# | _ |___ _ _ ___ ___
# | |- _| | | _| -_|
# |__|__|___|___|_|_|___|
# | \ ___ _ _| |___ ___
# | | | -_| | | | | . |_ -|
# |____/|___|\_/|_____| _|___|
# |_|
#
### Targets
@cat Makefile* | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: clean
clean: ## Clean the local environment
rm -fr vendor
.PHONY: install
install: ## Install dependencies
go get ./...
.PHONY: vet
vet: ## Vet the code
go vet ./...
.PHONY: lint
lint: ## Lint the code
golint -set_exit_status ./...
.PHONY: build
build: ## Build the application
go build ./...
.PHONY: test
test: ## Run the unit tests
go test -v -race ./... -coverprofile=coverage.out
go tool cover -func=coverage.out
.PHONY: test-cov
test-cov: test ## Run the unit tests with coverage
go tool cover -html=coverage.out
.PHONY: all
all: clean install lint vet build test ## Run all the tasks
.PHONY: doc
doc: ## Generate the documentation
godoc -http=:6060