-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·41 lines (32 loc) · 844 Bytes
/
deploy.sh
File metadata and controls
executable file
·41 lines (32 loc) · 844 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
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo Missing project id argument
exit
fi
PROJECTID=`gcloud projects list | grep -iw "$1" | awk '{print $1}'`
if [ -z "$PROJECTID" ]; then
echo Project $1 Not Found!
exit
fi
echo Project ID $PROJECTID
gcloud config set project $PROJECTID
rm -rf ./build
cd client && yarn install && yarn build && cd ..
##Build the task queue
if gcloud tasks queues list|grep zorya-tasks >/dev/null 2>&1; then
echo "Task Queue all ready exists"
else
gcloud tasks queues create zorya-tasks
fi
loc=`gcloud tasks queues describe zorya-tasks|grep name`
LOCATION="$(echo $loc | cut -d'/' -f4)"
echo
file_location='util/location.py'
if [ -f "$file_location" ]; then
rm $file_location
fi
cat > $file_location <<EOF
def get_location():
return "${LOCATION}"
EOF
gcloud app deploy -q app.yaml cron.yaml