-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
39 lines (32 loc) · 1.02 KB
/
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
KEYS_MONITOR_IMAGE_NAME=keysmonitor
KEYS_MONITOR_IMAGE_NAME_TAG=latest
DOCKER_FILE=Dockerfile
test:
@echo " > Running unit tests"
go test -cover -race -coverprofile=coverage.txt -covermode=atomic -v ./...
lint-install:
ifeq (,$(wildcard test -f bin/golangci-lint))
@echo "Installing golint"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s
endif
run-lint:
@echo "Running golint"
bin/golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 --timeout=2m
lint: lint-install run-lint
cli-docs:
cd ./cmd/monitor && go build
cd ./cmd && bash ./CLI.md.sh
check-cli-md:
cd ./cmd/monitor && go build
cd ./cmd && bash ./CLI.md.sh
@status=$$(git status --porcelain | grep CLI); \
if [ ! -z "$${status}" ]; \
then \
echo "Error - please update all CLI.md files by running the 'cli-docs' or 'check-cli-md' from Makefile!"; \
exit 1; \
fi
docker-build:
docker build \
-t ${KEYS_MONITOR_IMAGE_NAME}:${KEYS_MONITOR_IMAGE_NAME_TAG} \
-f ${DOCKER_FILE} \
.