forked from metachris/appengine-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload_to_appengine.sh
More file actions
executable file
·54 lines (43 loc) · 872 Bytes
/
upload_to_appengine.sh
File metadata and controls
executable file
·54 lines (43 loc) · 872 Bytes
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
#!/bin/bash
DIR=$( pwd )
function static_revert {
# Set /static back to dev environment
set -e
echo "Setting /static back to /static_dev"
cd app
rm static
ln -s static_dev static
cd "$DIR"
set +e
}
function static_toprod {
# Set build script results as /static
set -e
echo "Setting /static to /static_dev/publish"
cd app
rm static
ln -s static_dev/publish static
cd "$DIR"
set +e
}
function upload {
# Upload to appengine
~/Tools/google_appengine/appcfg.py update app
}
function build {
cd app/static_dev/build
ant minify
cd "$DIR"
}
read -p "Build the project with 'ant minify' now? [yN]" yn
case $yn in
[Yy]* ) build;;
[Nn]* ) ;;
esac
static_toprod
read -p "You can now test the latest build. Do you wish to upload this version? [yN]" yn
case $yn in
[Yy]* ) upload;;
[Nn]* ) ;;
esac
static_revert