fuzzyworld

template / windows / files / Makefile

Branch windows · default branch · all branches

Makefile

799 B · history · blame

1ifeq ($(OS),Windows_NT)
2 SHELL := pwsh.exe
3else
4 SHELL := pwsh
5endif
6.SHELLFLAGS := -Command
7
8all: install
9
10clean:
11 go clean
12
13build:
14 go mod tidy
15 go build .
16
17lint: build
18 golangci-lint version
19 golangci-lint run
20
21.PHONY: test
22test: build
23 New-Item -Path .\test\ -ItemType Directory -Force
24 go test -v -coverprofile="./test/coverage.out"
25 go tool cover -html="./test/coverage.out" -o "./test/coverage.html"
26 start "./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