-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (27 loc) · 905 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
.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/golangci-lint@v1.62.2
.PHONY: setup
setup: setup-pre-commit-ci
pre-commit install --hook-type commit-msg --hook-type pre-commit
go install github.com/air-verse/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
rm -r public
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"