aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-04 00:03:23 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-04 00:03:23 -0500
commit8fe87eb9df45d85c7d90221be242b0b6315b6f4d (patch)
treee561340504ce91eddfc1ab4b1383d68b1844d586 /Makefile
parentbcc1a56f57aee10fc79a14084f425cdab8b0325b (diff)
downloadcvez-8fe87eb9df45d85c7d90221be242b0b6315b6f4d.tar.bz2
cvez-8fe87eb9df45d85c7d90221be242b0b6315b6f4d.zip
Makefile: add comments
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 761ed14..79c23a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,37 @@
.PHONY=all test testjson vet vetjson cov covhtml clean
+# build binary
all:
go1.18beta1 build -ldflags='-s -w'
+# run all tests
test:
go1.18beta1 test -cover ./...
+# run all tests, print result to stdout as json
testjson:
go1.18beta1 test -json -cover ./...
+# run go vet
vet:
go1.18beta1 vet ./...
+# run go vet, print results to stdout as json
vetjson:
go1.18beta1 vet -json ./...
+# generate test coverage profile, print results to stdout
cov:
go1.18beta1 test -coverprofile=coverage.out ./... && \
go1.18beta1 tool cover -func=coverage.out
+# generate test coverage profile, render results as html, show
+# in browser
covhtml:
go1.18beta1 test -coverprofile=coverage.out ./... && \
go1.18beta1 tool cover -html=coverage.out -o coverage.html && \
xdg-open ./coverage.html
+# run go clean
clean:
go1.18beta1 clean