This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
54 lines (39 loc) · 1.66 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
.EXPORT_ALL_VARIABLES:
GO111MODULE = on
TESTABLE_PACKAGES = `go list ./... | egrep -v 'testing|constants|cmd' | grep 'pitaya-bot/'`
setup:
# NOOP
setup-ci:
@go get github.com/mattn/goveralls
@go get -u github.com/wadey/gocovmerge
setup-protobuf-macos:
@brew install protobuf
@go install github.com/gogo/protobuf/protoc-gen-gogofaster
run-testing-json-server:
@docker-compose -f ./testing/json/docker-compose.yml up -d etcd nats redis && go run ./testing/json/main.go
run-testing-json-bots:
@go run *.go run --duration 5s -d ./testing/json/specs/ --config ./testing/json/config/config.yaml
kill-testing-json-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 5s -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-mac:
@mkdir -p out
@GOOS=darwin GOARCH=amd64 go build -o ./out/pitaya-bot-darwin ./main.go
build-linux:
@mkdir -p out
@GOOS=linux GOARCH=amd64 go build -o ./out/pitaya-bot-linux ./main.go
build-windows:
@mkdir -p out
@GOOS=windows GOARCH=amd64 go build -o ./out/pitaya-bot-windows.exe ./main.go
test: unit-test-coverage
unit-test-coverage:
@echo "===============RUNNING UNIT TESTS==============="
@GO111MODULE=on go test $(TESTABLE_PACKAGES) -coverprofile coverprofile.out
build-docker-image: build-linux
@docker build -t pitaya-bot . -f Dockerfile-dev