forked from dodobrands/jaeger-kusto
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (37 loc) · 1.11 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
40
41
42
43
44
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
.PHONY: all
all: help
.PHONY: lint
lint:
golangci-lint run
.PHONY: tidy
tidy:
go mod tidy -v
.PHONY: prepare
prepare: tidy lint
.PHONY: build
build:
go build -v -o jaeger-kusto
.PHONY: test
test:
@echo "Running tests under test folder"
@go test -v \
--tags=integration \
-timeout 300s ./test/... | \
sed "/PASS/s//$(printf "\033[32mPASS\033[0m")/" | \
sed "/FAIL/s//$(printf "\033[31mFAIL\033[0m")/"
.PHONY: help
help:
@echo ''
@echo 'Usage:'
@echo ' ${YELLOW}make${RESET} ${GREEN}<target>${RESET}'
@echo ''
@echo 'Targets:'
@echo " ${YELLOW}lint ${RESET} Run linters via golangci-lint"
@echo " ${YELLOW}tidy ${RESET} Run tidy for go module to remove unused dependencies"
@echo " ${YELLOW}prepare ${RESET} Run all available checks"
@echo " ${YELLOW}build ${RESET} Setup local environment. Create kind cluster"
@echo " ${YELLOW}test ${RESET} Run integration tests"