-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
48 lines (37 loc) · 874 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
39
40
41
42
43
44
45
46
47
48
# Copyright SecureKey Technologies Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Tool commands (overridable)
DOCKER_CMD ?= docker
GOBIN_PATH=$(abspath .)/.build/bin
OS := $(shell uname)
ifeq ($(OS),$(filter $(OS),Darwin Linux))
PATH:=$(PATH):$(GOBIN_PATH)
else
PATH:=$(PATH);$(subst /,\\,$(GOBIN_PATH))
endif
GOBIN_PATH=$(abspath .)/build/bin
MOCKGEN=$(GOBIN_PATH)/mockgen
GOMOCKS=pkg/internal/gomocks
MOCK_VERSION ?=v1.7.0-rc.1
.PHONY: all
all: clean generate checks unit-test
.PHONY: checks
checks: generate license lint
.PHONY: lint
lint: generate
@scripts/check_lint.sh
.PHONY: license
license:
@scripts/check_license.sh
.PHONY: unit-test
unit-test: generate
@scripts/check_unit.sh
.PHONY: clean
clean:
@rm -rf ./.build
@rm -rf coverage*.out
.PHONY: generate
generate:
@go install github.com/golang/mock/mockgen@$(MOCK_VERSION)
@go generate ./...