Skip to content

Instantly share code, notes, and snippets.

@kpumuk
Created September 11, 2009 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpumuk/185265 to your computer and use it in GitHub Desktop.
Save kpumuk/185265 to your computer and use it in GitHub Desktop.
Script used to deploy to a QA server
#!/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