forked from immense055/AtomicSwapWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy
46 lines (35 loc) · 1.03 KB
/
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
38
39
40
41
42
43
44
45
46
#!/bin/sh
# build
npm run build:mainnet
# update repo or clone
git clone https://caffeinum:[email protected]/swaponline/mainnet.build.git
cd mainnet.build
git checkout deploy
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 ..
echo "Create pull request at"
echo
echo " https://github.com/swaponline/mainnet.build/compare/master...deploy"
echo
if [ $BOT_TOKEN ]; then
curl https://api.telegram.org/bot$BOT_TOKEN/sendMessage?chat_id=-329333490\&text="https://github.com/swaponline/mainnet.build/compare/master...deploy"
fi
if [ $GITHUB_TOKEN ]; then
curl -u caffeinum:$GITHUB_TOKEN -X POST https://api.github.com/repos/swaponline/mainnet.build/pulls -d '{"title":"build","head":"deploy","base":"master"}'
fi