-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
36 lines (28 loc) · 856 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
PLATFORM=$(shell uname -s | tr '[:upper:]' '[:lower:]')
PWD := $(shell pwd)
ifndef VERSION
VERSION := $(shell git describe --tags --abbrev=0)
endif
COMMIT_HASH :=$(shell git rev-parse --short HEAD)
DEV_VERSION := dev-${COMMIT_HASH}
USERID := $(shell id -u $$USER)
GROUPID:= $(shell id -g $$USER)
all: install-generator install generate check
.PHONY: install
install:
go mod tidy
go mod vendor
install-generator:
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/moov-io/xsd2go/cli/moovio_xsd2go@latest
generate:
./scripts/generate.sh
.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=60.0 ./lint-project.sh
endif