-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy
executable file
·37 lines (31 loc) · 866 Bytes
/
deploy
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
DEPLOY_DIR=deployDir
RELEASE_DIR=releaseDir
JAR_NAME=allmycoins.jar
COINS_MANU_TEMPLATE=myCoinsManu.template.json
PRIVATE_CONFIG_TEMPLATE=privateConfig.template.properties
PRIVATE_CONFIG=privateConfig.properties
DEPLOYED_JAR=$DEPLOY_DIR/$JAR_NAME
START_SCRIPT=allMyCoins
DEPLOYED_START_SCRIPT=$DEPLOY_DIR/$START_SCRIPT
# Setup
mkdir $DEPLOY_DIR
rm -rf $RELEASE_DIR
mkdir $RELEASE_DIR
#Cleaning
rm $DEPLOYED_JAR
rm $DEPLOYED_START_SCRIPT
# Clean install
mvn clean package
# Deploy
cp target/*-jar-with-dependencies.jar $DEPLOYED_JAR
cp $START_SCRIPT $DEPLOYED_START_SCRIPT
chmod a+x $DEPLOYED_START_SCRIPT
# Realease Zip
cp $DEPLOYED_JAR $RELEASE_DIR
cp $DEPLOYED_START_SCRIPT $RELEASE_DIR
cp $COINS_MANU_TEMPLATE $RELEASE_DIR
cp $PRIVATE_CONFIG_TEMPLATE $RELEASE_DIR
cd $RELEASE_DIR
mv $PRIVATE_CONFIG_TEMPLATE $PRIVATE_CONFIG
zip allMyCoins.zip *