-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
28 lines (24 loc) · 876 Bytes
/
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
msg?=
######################### test ################
test:
go test -race -coverprofile cover.out -coverpkg "./..." -failfast ./...
cover: test
go tool cover -html=cover.out
race:
go test -race -failfast ./...
fmt:
gofmt -s -w .
###################### pkg ##########################
.ONESHELL:
gitcheck:
if [[ "$(msg)" = "" ]] ; then echo "Usage: make pkg msg='commit msg'";exit 20; fi
.ONESHELL:
pkg: gitcheck test fmt
{ hash newversion.py 2>/dev/null && newversion.py version;} ; { echo version `cat version`; }
git commit -am "$(msg)"
#jfrog "rt" "go-publish" "go-pl" $$(cat version) "--url=$$GOPROXY_API" --user=$$GOPROXY_USER --apikey=$$GOPROXY_PASS
v=`cat version` && git tag "$$v" && git push origin "$$v" && git push origin HEAD
pkg0: test
v=`cat version` && git tag "$$v" && git push origin "$$v" && git push origin HEAD
report:
goreportcard-cli -v