forked from ugjka/go-tz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (34 loc) · 896 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
29
30
31
32
33
34
35
36
37
38
.PHONY: all fmt mapshaper generate build test tidy dep-list dep-upgrade fmt-imports fmt-go;
.SILENT: ; # no need for @
.ONESHELL: ; # recipes execute in same shell
.NOTPARALLEL: ; # wait for target to finish
.EXPORT_ALL_VARIABLES: ; # send all vars to shell
export GO111MODULE=on
HASRICHGO := $(shell which richgo)
ifdef HASRICHGO
GOTEST=richgo test
else
GOTEST=go test
endif
all: mapshaper generate build test
fmt: fmt-imports fmt-go
mapshaper:
sudo npm install -g mapshaper@latest
generate:
go generate ./tz/...
go fmt ./tz/...
build:
go build -v ./tz/...
test:
$(info Running all Go unit tests...)
$(GOTEST) -parallel 1 -count 1 -cpu 1 -tags slow -timeout 20m ./tz/...
tidy:
go mod tidy
dep-list:
go list -u -m -json all | go-mod-outdated -direct
dep-upgrade:
go get -u -t ./tz/...
fmt-imports:
goimports -w tz
fmt-go:
go fmt ./tz/...