-
Notifications
You must be signed in to change notification settings - Fork 16
/
deploy-explo.sh
executable file
·61 lines (53 loc) · 1.24 KB
/
deploy-explo.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
#!/bin/bash
echo -e "Deploy an update to Explo Development App Server\n"
export GOOGLE_APPLICATION_CREDENTIALS=./resources/Explo\ Development-414318fa79b8.json
export PROJECT_ID=explo-dev
cmd=$1
version=$2
function stats
{
echo "Skraflstats deployment starting"
echo "*** Currently disabled ***"
echo "Skraflstats deployment completed"
}
function indexes
{
echo "Index update starting"
echo "*** Currently disabled ***"
echo "Index update completed"
}
function cron
{
echo "Cron update starting"
echo "*** Currently disabled ***"
echo "Cron update completed"
}
function default # $1=version
{
if [[ $1 == "" ]]; then
echo "Version is missing; enter deploy d[efault] <version>"
exit 1
fi
echo "Default module deployment starting, version '$1'"
grunt make
gcloud beta app deploy --version=$1 --no-promote --project=explo-dev app-explo.yaml
echo "Default module deployment completed"
}
case $cmd in
skraflstats|stats|s)
stats
;;
indexes|ix|i)
indexes
;;
cron|c)
cron
;;
default|d)
default "$version"
;;
*)
echo "Please enter $0 (stats|indexes|cron|default <version>)"
exit 1
;;
esac