forked from bakito/adguardhome-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 745 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 745 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
# Run go fmt against code
fmt:
golangci-lint run --fix
# Run go mod tidy
tidy:
go mod tidy
# Run tests
test: test-ci fmt
# Run ci tests
test-ci: mocks tidy
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage.out
mocks: mockgen
mockgen -package client -destination pkg/mocks/client/mock.go github.com/bakito/adguardhome-sync/pkg/client Client
release: semver
@version=$$(semver); \
git tag -s $$version -m"Release $$version"
goreleaser --rm-dist
test-release:
goreleaser --skip-publish --snapshot --rm-dist
semver:
ifeq (, $(shell which semver))
$(shell go install github.com/bakito/semver@latest)
endif
mockgen:
ifeq (, $(shell which mockgen))
$(shell go install github.com/golang/mock/mockgen@v1.6.0)
endif