forked from topfreegames/pitaya-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (33 loc) · 1.43 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
TESTABLE_PACKAGES = `go list ./... | egrep -v 'testing|constants|models|cmd' | grep 'pitaya-bot/'`
setup:
@dep ensure
setup-ci:
@go get github.com/mattn/goveralls
@go get -u github.com/golang/dep/cmd/dep
@go get -u github.com/wadey/gocovmerge
@dep ensure
setup-protobuf-macos:
@brew install protobuf
@go get -u github.com/gogo/protobuf/protoc-gen-gogofaster
run-testing-server:
@docker-compose -f ./testing/json/docker-compose.yml up -d etcd nats && go run ./testing/json/main.go
run-testing-bots:
@go run *.go run -d ./testing/json/specs/ --config ./testing/json/config/config.yaml
kill-testing-deps:
@docker-compose -f ./testing/json/docker-compose.yml down; true
run-testing-proto-server:
@(cd ./testing/protobuffer/ && make protos-compile)
@docker-compose -f ./testing/protobuffer/docker-compose.yml up -d etcd nats && go run ./testing/protobuffer/main.go
run-testing-proto-bots:
@go run *.go run --duration 10s -d ./testing/protobuffer/specs/ --config ./testing/protobuffer/config/config.yaml
kill-testing-proto-deps:
@docker-compose -f ./testing/protobuffer/docker-compose.yml down; true
build-linux:
@mkdir -p out
@GOOS=linux GOARCH=amd64 go build -o ./out/pitaya-bot-linux ./main.go
test: unit-test-coverage
unit-test-coverage:
@echo "===============RUNNING UNIT TESTS==============="
@go test $(TESTABLE_PACKAGES) -coverprofile coverprofile.out
build-docker-image: build-linux
@docker build -t pitaya-bot . -f Dockerfile-dev