Commit 50020fca authored by zeroleak's avatar zeroleak
Browse files

add build.sh to build fresh jar from git

parent 657ddd0f
......@@ -56,3 +56,15 @@ server.rpc-client.mock-tx-broadcast = false
```
For testing purpose, *server.rpc-client.mock-tx-broadcast* can be enabled to mock txs instead of broadcasting it.<br/>
When enabled, server will keep whirlpool txs in memory until server restart and act as if these txs are confirmed in blockchain.
### Building
- Use *build.sh* on your local developer machine:
```
./build.sh
```
This script:
* clones whirlpool modules from git remote
* mvn install each module
* generate whirlpool-server-*.jar to *./build* directory
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:$password@github.com/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:$password@github.com/Samourai-Wallet/whirlpool-client.git
if [ "$?" -ne 0 ]; then
echo 'git clone error'; exit $rc
fi
cd whirlpool-client
mvn install
if [ "$?" -ne 0 ]; then
echo 'mvn install error'; exit $rc
fi
cd ..
# whirlpool-server
git clone https://$login:$password@github.com/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}"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment