-
Notifications
You must be signed in to change notification settings - Fork 39
/
build.sh
executable file
·37 lines (30 loc) · 931 Bytes
/
build.sh
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
#!/bin/bash
IMAGE=eoslaomao/eos-dev:1.4.0
NAME=bankofstaked
FOLDER=bankofstaked
docker ps | grep $NAME-eos-dev
if [ $? -ne 0 ]; then
echo "Run eos dev env "
docker run --name $NAME-eos-dev -dit --rm -v `(pwd)`:/$NAME $IMAGE
fi
docker exec $NAME-eos-dev eosio-cpp --contract bankofstaked \
-abigen /$NAME/src/$NAME.cpp -o $NAME.wasm \
-I /contracts/eosio.token/include \
-I /contracts/eosio.system/include \
-R /$NAME/rc/bankofstaked.ricardian.clauses.md
docker exec $NAME-eos-dev cp /$NAME.abi /$NAME.wasm /$NAME/
if [ -d build ]; then
rm -rf build
fi
mkdir build
echo "Create build dir!!"
mv $NAME.abi ./build
mv $NAME.wasm ./build
echo "Build SUCCESS!!!"
# For test and debug
docker exec nodeosd mkdir /$NAME
docker cp ./build/$NAME.abi nodeosd:/$NAME/
docker cp ./build/$NAME.wasm nodeosd:/$NAME/
docker cp scripts nodeosd:/
#run unit test
docker exec $NAME-eos-dev /bankofstaked/unittest.sh