-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
40 lines (31 loc) · 1018 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
.DEFAULT_GOAL := build
build:
cd cmd/gomodrun && go build -o ../../gomodrun -ldflags="-X main.version=$$(cat ../../VERSION)"
install:
cd cmd/gomodrun && go install -ldflags="-X main.version=$$(cat ../../VERSION)"
lint:
gomodrun golangci-lint run
lint-fix:
gomodrun golangci-lint run --fix
ginkgo:
gomodrun ginkgo -v -r .
release:
go mod tidy
git add .
git commit -m "v$$(cat VERSION)"
git tag -a "v$$(cat VERSION)" -m "v$$(cat VERSION)"
git push
git push --tags
gomodrun goreleaser --rm-dist
.github/apt.sh "$$(cat VERSION)" "$$(realpath dist)"
.github/choco.sh "$$(cat VERSION)" "$$(realpath dist)"
.github/nur.sh "$$(cat VERSION)" "$$(realpath dist)"
.github/yum.sh "$$(cat VERSION)" "$$(realpath dist)"
release-snapshot:
gomodrun goreleaser --snapshot --skip-publish --rm-dist
test: ginkgo
@make build && rm gomodrun
test-coverage:
gomodrun ginkgo -v -r -cover -coverprofile=coverage.txt -covermode=atomic -outputdir=. .
@go tool cover -func=coverage.txt
@make build && rm -f gomodrun