-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (30 loc) · 953 Bytes
/
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
## ----------------------
## Available make targets
## ----------------------
##
default: help
help: ## Display this message
@grep -E '(^[a-zA-Z0-9_\-\.]+:.*?##.*$$)|(^##)' Makefile | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | \
sed -e 's/\[32m##/[33m/'
##
## ----------------------
## Builds
## ----------------------
##
artifact: clean ## Generate binary in dist folder
goreleaser build --clean --snapshot --single-target
install: ## Generate binary and copy it to $GOPATH/bin (equivalent to go install)
goreleaser build --clean --snapshot --single-target -o $(GOPATH)/bin/s3-exporter
clean: ## Clean tmp files
rm -rf dist
##
## ----------------------
## Q.A
## ----------------------
##
qa: lint ## Run all Q.A.
LINT_CONFIG_VERSION = v1.0.2
lint:
curl -o .golangci.yml "https://raw.githubusercontent.com/radiofrance/lint-config/${LINT_CONFIG_VERSION}/.golangci.yml"
golangci-lint run --verbose