-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (43 loc) · 844 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
46
47
48
49
50
51
52
53
54
55
56
57
.PHONY: format
# Run go fmt against code
format:
go fmt ./...
.PHONY: fmt
# fmt is an alias for format
fmt: format
.PHONY: goimports
# Run goimports against code
goimports:
goimports -w .
.PHONY: vet
# Run go vet against code
vet:
go vet ./...
.PHONY: lint
# lint the code
lint:
golangci-lint run
.PHONY: build
# build the binary
build:
go build -v -o build/arcs24-backend main.go
.PHONY: cache
# clean cache
clean:
rm -rf build/arcs24-backend
.PHONY: swagger
# swager docs generation
swagger:
swag init -g main.go -o api/swagger
.PHONY: tidy
# tidy the go modules
tidy:
go mod tidy
.PHONY: gt generate-template
# generate template, THIS IS A DEV ONLY COMMAND DO NOT USE IN PRODUCTION
gt: generate-template
generate-template:
go run scripts/gen-tmpl.go
.PHONY: all
# default target
all: goimports format vet lint tidy