-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
51 lines (36 loc) · 938 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
PROJECT=ghcr.io/jittering/traefik-kop
.DEFAULT_GOAL := run
SHELL := bash
build-docker: build-linux
docker build --platform linux/amd64 -t ${PROJECT}:latest .
build-linux:
GOOS=linux go build ./bin/traefik-kop
build:
go build ./bin/traefik-kop
run:
go run ./bin/traefik-kop
serve: run
test:
go test ./...
cover:
go test -coverprofile=c.out ./...
watch:
watchexec -e go,yml "make test"
watch-cover:
watchexec -e go,yml "make cover"
clean:
rm -rf dist/
rm -f traefik-kop
release: clean
goreleaser release --rm-dist --skip-validate
update-changelog:
echo -e "# Changelog\n" >> temp.md
rel=$$(gh release list | head -n 1 | awk '{print $$1}'); \
echo "## $$rel" >> temp.md; \
echo "" >> temp.md; \
gh release view --json body $$rel | \
jq --raw-output '.body' | \
grep -v '^## Changelog' | \
sed -e 's/^#/##/g' >> temp.md
cat CHANGELOG.md | grep -v '^# Changelog' >> temp.md
mv temp.md CHANGELOG.md