mirror of
https://github.com/kiteco/kiteco-public.git
synced 2024-08-16 08:50:24 +03:00
23 lines
421 B
Bash
Executable File
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"
|