From 8f1b56bb6c9cfadef1fac9eb0a938911fabdaadc Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 20 Nov 2018 22:54:24 +0330 Subject: [PATCH] [skip ci] add commits script --- scripts/commits | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/commits diff --git a/scripts/commits b/scripts/commits new file mode 100755 index 0000000000..ab84c79f05 --- /dev/null +++ b/scripts/commits @@ -0,0 +1,17 @@ +#!/bin/bash + +# https://git-scm.com/docs/pretty-formats + +latestTag=`git describe | grep -oE "^[^-]+"` + +diff=`git --no-pager log $latestTag...dev --pretty="%s (%an) (%h)"` + +echo +echo "# Features" +echo "$diff" | awk '/feat/' +echo "$diff" | awk '/feat/' | grep -oE "[0-9a-f]{8}" > .git/feat.txt + +echo +echo "# Fixes" +echo "$diff" | awk '!/feat/' +echo "$diff" | awk '!/feat/' | grep -oE "[0-9a-f]{8}" > .git/fix.txt