-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
29 lines (25 loc) · 905 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
PLATFORM=$(shell uname -s | tr '[:upper:]' '[:lower:]')
VERSION := $(shell grep -Eo '(v[0-9]+[\.][0-9]+[\.][0-9]+(-[a-zA-Z0-9]*)?)' version.go)
.PHONY: check
check:
ifeq ($(OS),Windows_NT)
@echo "Skipping checks on Windows, currently unsupported."
else
@wget -O lint-project.sh https://raw.githubusercontent.com/moov-io/infra/master/go/lint-project.sh
@chmod +x ./lint-project.sh
COVER_THRESHOLD=50.0 ./lint-project.sh
endif
dist: clean
ifeq ($(OS),Windows_NT)
CGO_ENABLED=1 GOOS=windows go build -o bin/dukptcli.exe github.com/moov-io/dukpt/cmd/dukptcli
else
CGO_ENABLED=1 GOOS=$(PLATFORM) go build -o bin/dukptcli-$(PLATFORM)-amd64 github.com/moov-io/dukpt/cmd/dukptcli
endif
.PHONY: clean
clean:
@rm -rf ./bin/ ./tmp/ coverage.txt misspell* staticcheck lint-project.sh
.PHONY: cover-test cover-web
cover-test:
go test -coverprofile=cover.out ./...
cover-web:
go tool cover -html=cover.out