forked from dsmrreader/dsmr-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·59 lines (40 loc) · 890 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
#!/bin/bash
export GIT_PAGER=cat
./pre-deploy.sh
# Abort when user not sure.
if [ $? -ne 0 ]; then
echo "[!] Halted in pre-deployment: Either user ABORTED or script FAILED"
exit;
fi
echo ""
echo ""
echo " --- Checking Python version."
./check_python_version.py
if [ $? -ne 0 ]; then
echo "[!] Aborting deployment"
exit 1;
fi
echo ""
echo ""
echo " --- Pulling remote repository for new commits..."
git fetch
echo ""
echo ""
echo " --- Merging/updating checkout."
git merge FETCH_HEAD
echo ""
echo ""
echo " >>> Running post-deployment script. <<<"
./post-deploy.sh
# Abort on any error
if [ $? -ne 0 ]; then
echo "[!] Halted. Post-deployment script exited with non-zero code"
exit;
fi
echo ""
echo ""
echo " --- Deployed version: "
python -c 'import dsmrreader ; print(dsmrreader.__version__)'
echo ""
echo ""
echo " >>> Deployment complete. <<<"