Skip to content

Instantly share code, notes, and snippets.

@i80and
Created June 11, 2015 21:43
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 i80and/d713111e2d47ae1a42b6 to your computer and use it in GitHub Desktop.
Save i80and/d713111e2d47ae1a42b6 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
emailAddress=<USERNAME>@mongodb.com
# get the commit message
msg=`git log -1 --oneline | cut -d' ' -f2-`
hash=`git rev-parse HEAD`
hash=`git rev-parse HEAD~`..${hash}
OPTIONS="-y --oauth2 -H mongodbcr.appspot.com \
--server mongodbcr.appspot.com --email ${emailAddress}"
if [[ $# -eq 0 ]]; then
# just last commit
upload.py ${OPTIONS} -m "$msg" --rev $hash
else
# issue given
issue=$1
upload.py ${OPTIONS} -m "$msg" -i $issue --rev $hash
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment