-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
32 lines (26 loc) · 890 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
.PHONY: setup-pre-commit-ci
setup-pre-commit-ci:
# renovate: datasource=github-releases depName=golangci/golangci-lint
go install github.com/golangci/golangci-lint/cmd/[email protected]
.PHONY: setup
setup: setup-pre-commit-ci
pre-commit install --hook-type commit-msg --hook-type pre-commit
go install github.com/cosmtrek/air@latest
.PHONY: devserver
devserver: frontend
GIN_MODE=debug air
.PHONY: test
test:
go test ./... -covermode=atomic -coverprofile=coverage.out -count=1
.PHONY: coverage
coverage: test
go tool cover -html=coverage.out
.PHONY: frontend
frontend:
docker create --name frontend-extract ghcr.io/envelope-zero/frontend:3.3.5
docker cp frontend-extract:/usr/share/nginx/html public/
docker rm frontend-extract
VERSION ?= $(shell git rev-parse HEAD)
.PHONY: build
build:
go build -ldflags "-X github.com/envelope-zero/backend/pkg/router.version=5.5.2"