Revision a67b54b993b81fcb658d0352b710e27125e302a6 authored by lucy-kind on 20 August 2020, 19:49:41 UTC, committed by GitHub on 20 August 2020, 19:49:41 UTC
1 parent d3ab640
Raw File
deploywebschemas.org.sh
#!/bin/bash
set -e
set -u

#Deployment for the schema.org site

function usage {
    echo "usage: $(basename $0) -e -m"
	echo "-e bypasses exercise of site step"
	echo "-m bypasses migrate traffic to new version step"
}

EXE=""
MIG=""
while getopts 'em' OPTION; do
  case "$OPTION" in
    e)
      EXE="-e"
    ;;
    m)
        MIG="-m"
    ;;
    ?)
        usage
        exit 1
    ;;
  esac
done

if [ ! -d ./scripts ]
then
    echo "No valid scripts directory! Aborting"
	exit 1
fi

if [ ! -d sdopythonapp ]
then
    echo "No 'sdopythonapp' directory here aboorting!"
    exit 1
fi

if [ ! -x sdopythonapp/runscripts/runpythondeploy.sh ]
then
    echo "No 'sdopythonapp/runscripts' directory here aboorting!"
    exit 1
fi

git submodule update --remote

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

export ROBOTSBLOCK="YES" #ensure we end up with a blocking robots.txtS
sdopythonapp/runscripts/runpythondeploy.sh $EXE $MIG -p webschemas-g -y webschemas.yaml

back to top