kiteco-public/scripts/deploy_release.sh
2021-12-31 23:54:19 -08:00

23 lines
421 B
Bash
Executable File

#!/bin/bash
BRANCH=
HOST=
while getopts 'b:h:' flag; do
case "${flag}" in
b) BRANCH=${OPTARG} ;;
h) HOST=${OPTARG} ;;
esac
done
if [[ -z "$BRANCH" ]]; then
echo "branch (-b) is not set. exiting."
exit 1
fi
if [[ -z "$HOST" ]]; then
echo "host (-h) is not set. exiting."
exit 1
fi
fab pull_release:$BRANCH push_release:$BRANCH,hosts="$HOST" deploy_release:$BRANCH,hosts="$HOST"