-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1004 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (36 loc) · 1004 Bytes
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
.PHONY: alpha build bumped check goreleaser pc release test up update
default: check
check: pc test
pc:
prek run -a
test:
TESTCONTAINERS=1 go test -race -covermode=atomic -coverprofile=coverage.txt ./...
@go tool cover -func=coverage.txt | tail -1
update: up up-ci
up:
go get -u -t ./...
go mod tidy
go mod verify
up-ci:
prek update
pinact run --update
pindock run --update Dockerfile
build:
go build -ldflags=-s -o ./dist/ ./...
goreleaser:
goreleaser --clean --snapshot --skip=publish
bumped:
git cliff --bumped-version
# make alpha TAG=$(git cliff --bumped-version)-alpha.0
alpha: check
git tag -a $(TAG) -m "chore(release): $(TAG)"
git push origin $(TAG)
# make release TAG=$(git cliff --bumped-version)
release: check
git cliff -o CHANGELOG.md --tag $(TAG)
prek run --files CHANGELOG.md || prek run --files CHANGELOG.md
git add CHANGELOG.md
git commit -m "chore(release): prepare for $(TAG)"
git push
git tag -a $(TAG) -m "chore(release): $(TAG)"
git push origin $(TAG)