-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 876 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
envfile:=.env.local
ifeq ($(shell test ! -f .env.local && echo -n yes),yes)
envfile=env.example
endif
include $(envfile)
export $(shell sed 's/=.*//' $(envfile))
export BRANCH=$(shell git branch --show-current | cut -d '/' -f2)
version:=${BRANCH}
lint:
@golangci-lint run ./src/... --allow-parallel-runners
update-swagger:
@swag i fmt ./
@swag i -d ./
update-mocks:
@mockery
test:
@go test ./... -v -failfast
build:
@go build -ldflags "-X internal/config/config.Version=${version}" -o ./bin/fedits ./src/main.go
run:
@go run ./main.go
watch:
# increase the file watch limit, might required on MacOS
ulimit -n 1638400
air
install-tools:
@go install github.com/cosmtrek/air@latest
@go install github.com/vektra/mockery/v2@latest
@go install github.com/swaggo/swag/cmd/swag@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest