Skip to content

Instantly share code, notes, and snippets.

@sarogers
Last active September 14, 2015 18:09
Show Gist options
  • Save sarogers/af667fbd982c5e964299 to your computer and use it in GitHub Desktop.
Save sarogers/af667fbd982c5e964299 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$1" == "" ] || [ "$2" == "" ]; then
echo "USAGE: merge_deploy repo-name batch [batch2]..."
exit 0
fi
repoName=$1
git clone git@github.com:learn-co-curriculum/$repoName.git &&
cd $repoName
while [ "$2" != "" ]; do
batch=$2 && shift
echo "Deploying $repoName to $batch"
git remote add $batch git@github.com:learn-co-students/$repoName-$batch.git &&
git pull --no-edit $batch master &&
git push $batch master
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment