forked from swaponline/MultiCurrencyWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy
More file actions
72 lines (56 loc) · 1.64 KB
/
Copy pathdeploy
File metadata and controls
72 lines (56 loc) · 1.64 KB
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
65
66
67
68
69
70
71
72
#!/bin/sh
# build
git pull
npm run build:mainnet https://swaponline.github.io/
# update repo or clone
git clone https://sorentobot:$1@github.com/swaponline/swaponline.github.io.git
cd swaponline.github.io
git checkout master
git fetch origin
git reset --hard origin/master
# clean React code from repo
rm -rf assets
rm -rf images
rm -rf fonts
rm -rf *.css
rm -rf *.js
# update files in repo
cp -rf ../build-mainnet/* ./
# \cp build-mainnet/* mainnet.build/
# commit build to repo
DATE=`date '+%Y-%m-%d %H:%M:%S'`
git add .
git commit -m "build $DATE"
git push --force
# return back to root
cd ..
#####WIDGETS
npm run build:mainnet-widget
npm run build:testnet-widget
git clone https://sorentobot:$1@github.com/swaponline/widget.build.git
cd widget.build
git checkout master
git fetch origin
git reset --hard origin/master
rm -rf ./build-mainnet-widget/assets
rm -rf ./build-mainnet-widget/images
rm -rf ./build-mainnet-widget/fonts
rm -rf ./build-mainnet-widget/*.css
rm -rf ./build-mainnet-widget/*.js
rm -rf ./build-testnet-widget/assets
rm -rf ./build-testnet-widget/images
rm -rf ./build-testnet-widget/fonts
rm -rf ./build-testnet-widget/*.css
rm -rf ./build-testnet-widget/*.js
cp -rf ../build-mainnet-widget/* ./build-mainnet-widget/
cp -rf ../build-testnet-widget/* ./build-testnet-widget/
DATE=`date '+%Y-%m-%d %H:%M:%S'`
git add .
git commit -m "build $DATE"
git push --force
wget http://generator.swaponline.site/updatewidgets/
# return back to root
cd ..
#if [ $GITHUB_TOKEN ]; then
# curl -u caffeinum:$GITHUB_TOKEN -X POST https://api.github.com/repos/swaponline/swaponline.github.io/pulls -d '{"title":"build","head":"deploy","base":"master"}'
#fi