-
-
Save kpumuk/185265 to your computer and use it in GitHub Desktop.
Script used to deploy to a QA server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Usage: cqd [QAID] [BRANCH] | |
# When QAID is missing, 1 will be used | |
# When BRANCH is missing, current one will be used for deploy | |
# Example 1: cqd | |
# Deploy to qa01.scribd.com, deployment branch is master (if current one is master) | |
# Example 2: cqd 5 lazy_carousel | |
# Deploy to qa05.scribd.com, deployment branch is lazy_carousel | |
QAID=$1 | |
BRANCH=$2 | |
if [ "$QAID" == "" ]; then | |
QAID=1 | |
fi | |
if [ "$BRANCH" == "" ]; then | |
BRANCH=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
fi | |
echo "Deploying branch '$BRANCH' to 'QA$QAID'" | |
cap qa deploy QAID=$QAID BRANCH=$BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment