-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 838 Bytes
/
Copy pathMakefile
File metadata and controls
43 lines (34 loc) · 838 Bytes
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
NAME=geo-port
.PHONY: deps fmt test clean vet docker-build lint
deps:
@echo "Installing dependencies ..."
@go mod tidy && go mod download
@go install github.com/onsi/ginkgo/v2/ginkgo
@echo "Installing dependencies, done!"
fmt:
@echo "Formatting code ..."
@go fmt ./...
@echo "Formatting code, done!"
test:
@echo "Running tests ..."
@ginkgo -r -cover ./internal
@echo "Running tests, done!"
build: deps clean
@echo "Building ...."
@mkdir -p ./build
@go build -o ./build/$(NAME)
@echo "Build done"
docker-build: deps clean
@echo "Building Docker image ..."
@docker build -t $(NAME) .
@echo "Building Docker image, done!"
clean:
@echo "Cleaning ..."
@go clean && rm -rf ./build
@echo "Cleaning done"
vet:
@echo "Running vet ..."
@go vet ./...
@echo "Running vet, done!"
lint:
@golangci-lint run --tests=false