forked from redhat-et/copilot-ops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 990 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
41
42
43
44
45
build:
@ echo ▶️ go build
go build
@ echo ✅ go build
@ echo ./copilot-ops -h "# run me!"
.PHONY: build
test: build
@ echo ▶️ go test
go clean -testcache ./...
go test -v ./...
@ echo ✅ go test
@ echo ▶️ go vet
go vet ./...
@ echo ✅ go vet
.PHONY: test
##@ Development
.PHONY: lint
lint: golangci-lint ## Lint source code
@ echo "▶️ golangci-lint run"
$(GOLANGCILINT) run ./...
@ echo "✅ golangci-lint run"
# .PHONY: test
# test: lint ginkgo ## Run tests.
##@ Build Dependencies
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
##@ Download utilities
# for performing lints
.PHONY: golangci-lint
GOLANGCILINT := $(LOCALBIN)/golangci-lint
GOLANGCI_URL := https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
golangci-lint: $(GOLANGCILINT) ## Download golangci-lint
$(GOLANGCILINT): $(LOCALBIN)
curl -sSfL $(GOLANGCI_URL) | sh -s -- -b $(LOCALBIN) $(GOLANGCI_VERSION)