forked from bitleak/lmstfy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (23 loc) · 866 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
PROGRAM=lmstfy-server
PKG_FILES=`go list ./... | sed -e 's=github.com/bitleak/lmstfy/=./='`
CCCOLOR="\033[37;1m"
MAKECOLOR="\033[32;1m"
ENDCOLOR="\033[0m"
all: $(PROGRAM)
.PHONY: all
$(PROGRAM):
@bash build.sh
@echo ""
@printf $(MAKECOLOR)"Hint: It's a good idea to run 'make test' ;)"$(ENDCOLOR)
@echo ""
test:
- cd scripts/redis && docker-compose up -d && cd ../..
@LMSTFY_TEST_CONFIG=`pwd`/scripts/test-conf.toml sh scripts/run-test.sh
- cd scripts/redis && docker-compose down && cd ../..
lint:
@rm -rf lint.log
@printf $(CCCOLOR)"Checking format...\n"$(ENDCOLOR)
@go list ./... | sed -e 's=github.com/bitleak/lmstfy/=./=' | xargs -n 1 gofmt -d -s 2>&1 | tee -a lint.log
@printf $(CCCOLOR)"Checking vet...\n"$(ENDCOLOR)
@go list ./... | sed -e 's=github.com/bitleak/lmstfy/=./=' | xargs -n 1 go vet 2>&1 | tee -a lint.log
@[ ! -s lint.log ]