-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (31 loc) · 872 Bytes
/
Makefile
File metadata and controls
45 lines (31 loc) · 872 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
45
LINUX_BUILD := env GOOS=linux go build
MAC_BUILD := env GOOS=darwin go build
.PHONY: build build-test fmt lint unit coverage integration mock release install-semver up-major up-minor up-release
build:
go build -o gotouch -v ./cmd/gotouch/
fmt:
go fmt ./...
gofumpt -l -w -extra .
lint:
golangci-lint run
build-test:
$(LINUX_BUILD) -v -o gotouch-linux -tags=integration ./cmd/gotouch/
$(MAC_BUILD) -v -o gotouch-darwin -tags=integration ./cmd/gotouch/
unit:
go test -v -coverprofile coverage.out ./...
coverage:
go tool cover -html=coverage.out
integration: build-test
go test -v --tags=integration_test ./...
mock:
go generate -v ./...
release:
goreleaser release --snapshot --clean
install-semver:
go install github.com/maykonlf/semver-cli/cmd/semver@latest
up-major:
semver up major
up-minor:
semver up minor
up-release:
semver up release