Skip to content

Instantly share code, notes, and snippets.

@replsv
Created January 26, 2016 15:01
Show Gist options
  • Save replsv/507d76f7e02ee01308e6 to your computer and use it in GitHub Desktop.
Save replsv/507d76f7e02ee01308e6 to your computer and use it in GitHub Desktop.
#!/bin/bash
while [[ $# > 1 ]]
do
key="$1"
case $key in
-i|--initial)
INITIAL_COMMIT="$2"
shift # past argument
;;
-f|--final)
FINAL_COMMIT="$2"
shift # past argument
;;
--default)
DEFAULT=YES
;;
*)
;;
esac
shift # past argument or value
done
echo $INITIAL_COMMIT
echo "### Release: ${FINAL_COMMIT}"
echo "Changes:"
echo "\`\`\`"
git log ${INITIAL_COMMIT}..${FINAL_COMMIT} --graph --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(white)%s%C(reset)"
echo "\`\`\`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment