forked from schemaorg/schemaorg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploypythonapp.sh
executable file
·51 lines (41 loc) · 1.04 KB
/
deploypythonapp.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
#!/bin/bash
set -e
set -u
######### run local sdopythonapp deply script #######
PWD="`pwd`"
PROG="`basename $0`"
echo "Deploy sdopythonapp application... "
if [ ! -d sdopythonapp ]
then
echo "No 'sdopythonapp' directory here aborting!"
exit 1
fi
if [ ! -d sdopythonapp/runscripts ]
then
echo "No 'sdopythonapp/runscripts' directory here aborting!"
exit 1
fi
if [ ! -x sdopythonapp/runscripts/runpythondeploy.sh ]
then
echo "No 'sdopythonapp/runscripts/runpythondeploy.sh' here aborting!"
exit 1
fi
if [[ $# -eq 1 && "$1" == "-devapp" ]]
then
echo "Not synchronising 'sdopythonapp' with git"
shift
else
echo "Checking sdopythonapp is upto date"
git submodule update --remote
fi
echo
devpath=`which dev_appserver.py`
if [ ! -z "$devpath" ]
then
echo "Dev App Server located at $devpath"
APP_ENGINE=${devpath%%"/bin/dev_appserver.py"}
export APP_ENGINE="${APP_ENGINE}/platform/google_appengine/"
echo "Setting \$APP_ENGINE to '$APP_ENGINE"
echo
fi
sdopythonapp/runscripts/runpythondeploy.sh $@