-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
107 lines (86 loc) · 3.41 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
ORG := automatethethingsllc
PACKAGE := tradebot
TARGET_OS := linux
ARCH := $(shell go env GOARCH)
OS := $(shell go env GOOS)
BUILD_DIR = build
export PATH := $(GOPATH)/bin:$(PATH)
default: build
deps:
go get "github.com/stretchr/testify"
go get "github.com/op/go-logging"
go get "github.com/jinzhu/gorm"
go get "github.com/jinzhu/gorm/dialects/sqlite"
#go get "github.com/jinzhu/gorm/dialects/mysql"
go get "golang.org/x/text/encoding/unicode"
go get "github.com/patrickmn/go-cache"
go get "github.com/gorilla/websocket"
go get "github.com/gorilla/mux"
go get "github.com/codegangsta/negroni"
go get "github.com/dgrijalva/jwt-go"
go get "github.com/ethereum/go-ethereum"
go get "github.com/Zauberstuhl/go-coinbase"
go get "github.com/preichenberger/go-gdax"
go get "github.com/toorop/go-bittrex"
go get "github.com/adshao/go-binance"
go get "github.com/joho/godotenv"
go get "github.com/shopspring/decimal"
go get "golang.org/x/crypto/bcrypt"
certs:
mkdir -p keys/
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -keyout keys/key.pem -out keys/cert.pem \
-subj "/C=US/ST=Blockchain/L=Tradebot/O=Cryptoconomy/CN=localhost"
openssl genrsa -out keys/rsa.key 1024
openssl rsa -in keys/rsa.key -pubout > keys/rsa.pub
unittest:
cd dao && go test -v
cd plugins/indicators/src && go test -v
cd service && go test -v
integrationtest:
cd dao && go test -v -tags integration
cd plugins/indicators/src && go test -v -tags integration
cd service && go test -v -tags integration
test: unittest integrationtest
indicators:
cd plugins/indicators/src && go build -buildmode=plugin -o ../example.so example.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../sma.so sma.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../ema.so ema.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../rsi.so rsi.go sma.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../bollinger_bands.so bollinger_bands.go sma.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../macd.so macd.go ema.go
cd plugins/indicators/src && go build -buildmode=plugin -o ../obv.so obv.go
strategies:
cd plugins/strategies/src && go build -buildmode=plugin -o ../default.so default.go
exchanges:
cd plugins/exchanges/src && go build -buildmode=plugin -o ../coinbase.so coinbase.go
cd plugins/exchanges/src && go build -buildmode=plugin -o ../gdax.so gdax.go
cd plugins/exchanges/src && go build -buildmode=plugin -o ../bittrex.so bittrex.go
cd plugins/exchanges/src && go build -buildmode=plugin -o ../binance.so binance.go
wallets:
cd plugins/wallets/src && go build -buildmode=plugin -o ../btc.so btc.go
cd plugins/wallets/src && go build -buildmode=plugin -o ../eth.so eth.go
cd plugins/wallets/src && go build -buildmode=plugin -o ../xrp.so xrp.go
#cd plugins/wallets/src && go build -buildmode=plugin -o ../bch.so bch.go
plugins: indicators strategies exchanges wallets
clean:
rm -rf keys/
cd plugins/indicators && rm -rf *.so
cd plugins/strategies && rm -rf *.so
cd plugins/exchanges && rm -rf *.so
cd plugins/wallets && rm -rf *.so
rm -rf tradebot
cd webapp && yarn clean
debugbuild: clean plugins
go build -gcflags "-N -l"
quickdebug:
go build -gcflags "-N -l"
quickbuild:
go build -ldflags "-w"
dockerbuild: clean deps certs plugins
go build
./docker-build.sh
quick: quickdebug plugins
webapp:
cd webapp && npm i && yarn build:dev
build: clean certs plugins webapp
go build