-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·64 lines (54 loc) · 1.3 KB
/
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
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
echo "*** whirlpool-server build ***"
read -p 'Git username: ' login
read -sp 'Git token: ' password
echo ''
rm -Rf build
mkdir build
cd build
mkdir tmp
cd tmp
# whirlpool-protocol
git clone https://$login:[email protected]/Samourai-Wallet/whirlpool-protocol.git
if [ "$?" -ne 0 ]; then
echo 'git clone error'; exit $rc
fi
cd whirlpool-protocol
mvn install
if [ "$?" -ne 0 ]; then
echo 'mvn install error'; exit $rc
fi
cd ..
# whirlpool-client
git clone https://$login:[email protected]/Samourai-Wallet/whirlpool-client.git
if [ "$?" -ne 0 ]; then
echo 'git clone error'; exit $rc
fi
cd whirlpool-client
mvn install -Dmaven.test.skip=true
if [ "$?" -ne 0 ]; then
echo 'mvn install error'; exit $rc
fi
cd ..
# whirlpool-server
git clone https://$login:[email protected]/Samourai-Wallet/whirlpool-server.git
if [ "$?" -ne 0 ]; then
echo 'git clone error'; exit $rc
fi
cd whirlpool-server
mvn install -Dmaven.test.skip=true
if [ "$?" -ne 0 ]; then
echo 'mvn install error'; exit $rc
fi
cd ..
# move jar to ./build
cd ../..
cd build/tmp/whirlpool-server/target/
for filename in whirlpool-server-*.jar; do
jarname=$filename
done
cd ../../../..
echo "Copying ${jarname} to ./build"
cp build/tmp/whirlpool-server/target/${jarname} build/
# cleanup
rm -Rf build/tmp
echo "Build success: ./build/${jarname}"