Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created January 24, 2017 15:27
Show Gist options
  • Save proffalken/46fb5fd6e6556d81b1d340edb1c872fb to your computer and use it in GitHub Desktop.
Save proffalken/46fb5fd6e6556d81b1d340edb1c872fb to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# list the authors of a given release in Git
#
TAG=$1
START_TAG=$(echo $TAG | cut -d '.' -f 1).0.0
echo "FETCHING TAGS"
git fetch
echo "CLEANING UP....."
rm combinedOutput.tmp
git log --pretty=format:"%h,%an,%ae,%s" $START_TAG...$TAG | sort -g > combinedOutput.tmp
cat combinedOutput.tmp | cut -d ',' -f 2,3 | sort -g | uniq > authorList.tmp
echo "COMPARING $START_TAG WITH $TAG..."
echo -e "Authors\n========"
cat authorList.tmp
echo -e "\nFILES\n======="
for a in $(cut -d ',' -f 1 combinedOutput.tmp);
do
git show --name-only --pretty=format: $a
done | grep -v ^$ | sort -g | uniq
echo -e "\nJIRA TICKETS\n=========="
for a in $(cut -d ',' -f 1 combinedOutput.tmp | grep -v ^$);
do
JIRA_TICKET=$(git show --name-only --pretty=format:%b $a | grep JIRA | cut -d ':' -f 2 | tr -d ' ')
echo "https://<JIRASERVER GOES HERE>/browse/$JIRA_TICKET"
done | grep -v ^$ | sort -g | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment