forked from KhogaEslam/react-social-login
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
86 lines (62 loc) · 969 Bytes
/
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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
if ! git diff-index --quiet HEAD --; then
echo "Git tree not clean"
exit 1
fi
export FB_APP_ID=530411637301990
export INSTAGRAM_REDIRECT=https://deepakaggarwal7.github.io/react-social-login
npm run lint
lint=$?
if [ $lint -ne 0 ]; then
exit 1
fi
cd demo && { webpack -p; cd -; }
build=$?
if [ $build -ne 0 ]; then
exit 1
fi
git add demo/public
add=$?
if [ $add -ne 0 ]; then
exit 1
fi
git stash
stash=$?
if [ $stash -ne 0 ]; then
exit 1
fi
git checkout gh-pages
checkout=$?
if [ $checkout -ne 0 ]; then
exit 1
fi
git pull
pull=$?
if [ $pull -ne 0 ]; then
exit 1
fi
git stash pop
pop=$?
if [ $pop -ne 0 ]; then
exit 1
fi
mv demo/public/* .
mv=$?
if [ $mv -ne 0 ]; then
exit 1
fi
git reset HEAD demo/public/*
reset=$?
if [ $reset -ne 0 ]; then
exit 1
fi
git add index.html main.js
add=$?
if [ $add -ne 0 ]; then
exit 1
fi
git commit -m "Update gh-pages"
commit=$?
if [ $commit -ne 0 ]; then
exit 1
fi