fuzzyworld

template / ci-testing / files / Makefile

Branch ci-testing · default branch · all branches

Makefile

811 B · history · blame

1.PHONY: test
2
3all: build test lint install
4
5prep:
6 go mod tidy
7
8clean:
9 go clean
10
11build: prep
12 go build .
13
14lint: build
15 go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
16 golangci-lint --version
17 golangci-lint run
18
19test: build
20 go test -v ./... -coverprofile="./test-coverage.out"
21
22test_coverage: test
23 go tool cover -html="./test-coverage.out" -o "./test-coverage.html"
24
25test_coverage_html: test_coverage
26 open "./test-coverage.html"
27
28install: build test lint
29 go install
30 template reset
31
32uninstall:
33 go clean -i gitlab.com/fuzzy-rp/template...
34
35release-dry-run: build test lint
36 go install github.com/goreleaser/goreleaser@latest
37 goreleaser release --snapshot --rm-dist
38
39release-local: build test lint
40 go install github.com/goreleaser/goreleaser@latest
41 goreleaser build --single-target