-
Notifications
You must be signed in to change notification settings - Fork 259
/
check.sh
executable file
·72 lines (54 loc) · 1.41 KB
/
check.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
#!/bin/sh
# Check for standard-version
if ! command -v standard-version &> /dev/null; then
echo "standard-version could not be found, install it via npm i -g standard-version"
exit
fi
APP_PATH=`echo $0 | awk '{split($0,patharr,"/"); idx=1; while(patharr[idx+1] != "") { if (patharr[idx] != "/") {printf("%s/", patharr[idx]); idx++ }} }'`
APP_PATH=`cd "$APP_PATH"; pwd`
cd "${APP_PATH}"
echo "## Rebuilding containers"
echo
echo "### Step 1: Are we ready to go?"
echo
function confirm_quit {
echo "WARNING! Something went wrong! Do you want me to proceed?"
select answer in "Yes" "No"; do
case $answer in
No)
exit -1
;;
Yes)
break
;;
esac
done
}
echo "1. Check doubtfire-deploy"
cd "${APP_PATH}"
"${APP_PATH}/tools/git-ready-to-deploy.sh"
if [ $? -ne 0 ]; then
echo "Please ensure that the deploy directory is free of changes. Commit and push all changes to ensure deploy can be reproduced by others.";
confirm_quit
fi
echo
echo "2. Check doubtfire-web"
cd doubtfire-web
"${APP_PATH}/tools/git-ready-to-deploy.sh"
if [ $? -ne 0 ]; then
confirm_quit
fi
echo
echo "3. Check doubtfire-api"
cd "${APP_PATH}/doubtfire-api"
"${APP_PATH}/tools/git-ready-to-deploy.sh"
if [ $? -ne 0 ]; then
confirm_quit
fi
echo
echo "4. Check overseer"
cd "${APP_PATH}/doubtfire-overseer"
"${APP_PATH}/tools/git-ready-to-deploy.sh"
if [ $? -ne 0 ]; then
confirm_quit
fi