-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (51 loc) · 1.33 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
DIST ?= development
DEBUG ?= --debug
.DEFAULT_GOAL := debug
.PHONY: bump
.PHONY: vet
.PHONY: lint
all: test \
benchmark \
coverage
clean:
go clean
rm -rf bin
update:
go get -u github.com/uhppoted/uhppote-core@main
go get -u golang.org/x/sys
go mod tidy
update-release:
go get -u github.com/uhppoted/uhppote-core
go get -u golang.org/x/sys
go mod tidy
format:
go fmt ./...
build: format
go build -trimpath ./...
test: build
go test ./...
benchmark: build
go test -bench ./...
coverage: build
go test -cover ./...
vet:
go vet ./...
lint:
env GOOS=darwin GOARCH=amd64 staticcheck ./...
env GOOS=linux GOARCH=amd64 staticcheck ./...
env GOOS=windows GOARCH=amd64 staticcheck ./...
vuln:
govulncheck ./...
build-all: test vet lint
env GOOS=linux GOARCH=amd64 GOWORK=off go build -trimpath ./...
env GOOS=linux GOARCH=arm GOARM=7 GOWORK=off go build -trimpath ./...
env GOOS=darwin GOARCH=amd64 GOWORK=off go build -trimpath ./...
env GOOS=windows GOARCH=amd64 GOWORK=off go build -trimpath ./...
release: build-all
publish: release
echo "Releasing version $(VERSION)"
gh release create "$(VERSION)" --draft --prerelease --title "$(VERSION)-beta" --notes-file release-notes.md
debug: build
go test -v -run TestDeviceUnmarshal ./config/...
godoc:
godoc -http=:80 -index_interval=60s