-
Notifications
You must be signed in to change notification settings - Fork 3
/
deploy.sh
executable file
·45 lines (37 loc) · 1.6 KB
/
deploy.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
#!/bin/bash
#########################################
echo "Building production version"
#########################################
mv ./node_modules ./node_modules_old
npm i
./node_modules/.bin/ng build --prod
#########################################
echo "Change directory to dist"
#########################################
cd ./dist/blockchain-wallet && rm -f ./wallet.zip && zip -r ./wallet.zip ./*
#########################################
echo "Compress to wallet.zip file"
#########################################
# zip -rf wallet.zip ./*
#########################################
echo "Send wallet.zip to remote: 37.187.115.92"
#########################################
scp ./wallet.zip root@37.187.115.92:/home
rm ./wallet.zip
#########################################
echo "[Remote] Unzip wallet.zip"
#########################################
ssh root@37.187.115.92 'cp /home/wallet.zip /var/www/inescoin.org/public_html/inescoin-wallet/public && cd /var/www/inescoin.org/public_html/inescoin-wallet/public && unzip -o /home/wallet.zip'
#########################################
echo "[Remote] Chmod 777"
#########################################
ssh root@37.187.115.92 'chmod -R 777 /var/www/inescoin.org/public_html/inescoin-wallet/public'
#########################################
echo "[Remote] Chown www-data"
#########################################
ssh root@37.187.115.92 'chown -R www-data:www-data /var/www/inescoin.org/public_html/inescoin-wallet/public'
#########################################
echo "Clean"
#########################################
rm -rf ./node_modules/
mv ./node_modules_old ./node_modules