2013-04-12 21:19:21 +04:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Deploys the app to App Engine.
|
2015-07-30 09:14:40 +03:00
|
|
|
#
|
2013-04-12 21:19:21 +04:00
|
|
|
# Note: This script should be used in place of using appcfg.py update directly
|
|
|
|
# to update the application on App Engine.
|
|
|
|
#
|
2015-07-30 09:14:40 +03:00
|
|
|
# Copyright 2015 Eric Bidelman <ericbidelman@chromium.org>
|
2013-04-12 21:19:21 +04:00
|
|
|
|
|
|
|
|
2017-07-03 08:14:35 +03:00
|
|
|
deployVersion=$1
|
2020-02-24 20:22:24 +03:00
|
|
|
appName=${2:-cr-status}
|
2022-09-12 23:56:50 +03:00
|
|
|
|
2022-09-20 19:55:24 +03:00
|
|
|
deployAppYaml="app.staging.yaml"
|
|
|
|
deployNotifierYaml="notifier.staging.yaml"
|
2022-09-12 23:56:50 +03:00
|
|
|
if [[ "${appName}" == "cr-status" ]]; then
|
2022-09-20 19:55:24 +03:00
|
|
|
deployAppYaml="app.yaml"
|
|
|
|
deployNotifierYaml="notifier.yaml"
|
2022-09-12 23:56:50 +03:00
|
|
|
fi
|
|
|
|
|
2017-07-03 08:14:35 +03:00
|
|
|
usage="Usage: deploy.sh `date +%Y-%m-%d`"
|
|
|
|
|
|
|
|
if [ -z "$deployVersion" ]
|
|
|
|
then
|
|
|
|
echo "App version not specified."
|
|
|
|
echo $usage
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2013-04-12 21:19:21 +04:00
|
|
|
# The directory in which this script resides.
|
|
|
|
readonly BASEDIR=$(dirname $BASH_SOURCE)
|
2014-03-24 20:23:22 +04:00
|
|
|
|
2016-07-22 00:06:04 +03:00
|
|
|
gulp
|
2014-03-02 09:54:17 +04:00
|
|
|
|
2022-06-11 00:56:40 +03:00
|
|
|
gcloud beta app deploy \
|
2020-02-24 20:22:24 +03:00
|
|
|
--project $appName \
|
2017-10-17 19:57:53 +03:00
|
|
|
--version $deployVersion \
|
|
|
|
--no-promote \
|
2022-09-20 19:55:24 +03:00
|
|
|
$BASEDIR/../$deployNotifierYaml \
|
|
|
|
$BASEDIR/../$deployAppYaml \
|
2022-01-06 03:22:01 +03:00
|
|
|
$BASEDIR/../dispatch.yaml \
|
|
|
|
$BASEDIR/../cron.yaml
|