jira-changelog.sh 691 B

1234567891011121314
  1. #!/bin/bash
  2. # Compare first tag/commit argument to Second commit/tag argument OR head
  3. COMPARE_TO=${2:-HEAD}
  4. CHANGES_WITH_TIX=$(git log --color=always --no-merges --oneline $1...$COMPARE_TO | egrep -i '(M3(-|\s)[0-9]*)')
  5. CHANGES_WITHOUT_TIX=$(git log --color=always --no-merges --oneline $1...$COMPARE_TO | egrep -iv '(M3(-|\s)[0-9]*)')
  6. JQL_QUERY=$(echo "key in ($(git log --color=always --no-merges --oneline $1...$COMPARE_TO | egrep -oi --color=always '(M3(-|\s)[0-9]*)' | tr '\n' ',' | sed 's/.$//' | tr ' ' '-'))" )
  7. echo -e "Tracked Changes in $1:\n"
  8. echo "$CHANGES_WITH_TIX"
  9. echo -e "\nUntracked Changes in $1:\n"
  10. echo "$CHANGES_WITHOUT_TIX"
  11. echo -e "\nJQL QUERY: \n\n$JQL_QUERY\n\a"