forked from zurichat/zc_core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (47 loc) · 1.26 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
APP=zc-core
APP_EXECUTABLE="./out/$(APP)"
ALL_PACKAGES=$(shell go list ./... | grep -v "tests" | grep -v "cmd")
PORT?=8080
ENV_LOCAL_TEST=\
DB_NAME=zurichat \
CLUSTER_URL=mongodb+srv \
ENV=local\
PORT=8080
install:
@go install ./...
@echo ""
@echo "Run: make help to get more info on the available zc_core make commands"
@echo ""
test.unit:
@go test ./unit-tests/...
test.integration:
@$(ENV_LOCAL_TEST) \
go test -tags=integration ./tests/... -v -count=1
run:
@go run main.go
build:
@go build -o bin/main main.go
install_lint:
@go install github.com/golangci/golangci-lint/cmd/[email protected]
lint:
@golangci-lint run
clean:
@go clean
fresh:
@go install github.com/mitranim/gow@latest
@gow run .
help:
@echo "Usage:"
@echo " make [command]"
@echo ""
@echo "Available commands:"
@echo " help more info on zc_core make commands"
@echo " make installs all project dependencies"
@echo " run runs the application"
@echo " fresh runs the application in a watch mode"
@echo " build builds the application into /bin folder"
@echo " clean go clean command"
@echo " install_lint runs unit tests"
@echo " lint runs golangci linting"
@echo " test.unit runs unit tests"
@echo " test.integration runs integration tests"