forked from philsong/bitcoin-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·53 lines (40 loc) · 1.15 KB
/
install
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
#!/usr/bin/env bash
set -e
if [ ! -f install ]; then
echo 'install must be run within its container folder' 1>&2
exit 1
fi
CURDIR=`pwd`
OLDGOPATH="$GOPATH"
export GOPATH="$CURDIR/thirdparty"
echo 'install gpcode...'
go get github.com/nsf/gocode
echo 'install testify...'
go get github.com/stretchr/testify
echo 'install simplejson...'
go get github.com/bitly/go-simplejson
echo 'install pg...'
go get github.com/lib/pq
echo 'install gorm...'
go get github.com/jinzhu/gorm
echo 'install thrift...'
go get github.com/apache/thrift/lib/go/thrift
echo 'install logrus...'
go get github.com/sirupsen/logrus
echo 'install lfshook...'
go get github.com/rifflock/lfshook
# echo 'generate thrift...'
thrift -r -out "./lib/src" --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift ./etc/broker.thrift
# thrift -r -out "../djhaobtc/broker/" --gen py ../etc/thrift/broker.thrift
export GOPATH="$CURDIR:$CURDIR/thirdparty:$CURDIR/lib"
rm -rf lib/pkg
echo 'install broker...'
go install broker
# mockery -output="./src/mocks" -name=TradeAPI
gofmt -w src
if [ ! -d log ]; then
mkdir log
fi
export GOPATH="$OLDGOPATH"
export PATH="$OLDPATH"
echo 'finished'