mirror of
https://github.com/kiteco/kiteco-public.git
synced 2024-09-11 13:38:04 +03:00
23 lines
421 B
Bash
23 lines
421 B
Bash
|
#!/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"
|