update: Guidlines and test script for git commit based release notes

This commit is contained in:
Jan 2024-05-13 09:46:03 +02:00
parent caa4513920
commit ed117d6195
2 changed files with 38 additions and 9 deletions

View file

@ -29,13 +29,40 @@ echo ""
echo "Release Notes from $secondLastTag to $latestTag:"
echo ""
# Separate features and fixes
features=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'feature:' | sed 's/feature:/* /g' | sort | uniq)
fixes=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'fix:' | sed 's/fix:/* /g' | sort | uniq)
# Separate types of commits
newfeatures=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'new:' | sed 's/new:/* /g' | sort | uniq)
updatedfeatures=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'update:' | sed 's/update:/* /g' | sort | uniq)
fixedfeatures=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'fix:' | sed 's/fix:/* /g' | sort | uniq)
deletedfeatures=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'delete:' | sed 's/delete:/* /g' | sort | uniq)
echo "New Features:"
echo "$features"
if [ -z "$newfeatures" ]; then
echo "* No new features."
else
echo "$newfeatures"
fi
echo ""
echo "Fixes:"
echo "$fixes"
echo "Updated Features:"
if [ -z "$updatedfeatures" ]; then
echo "* No updated features."
else
echo "$updatedfeatures"
fi
echo ""
echo "Fixed Features:"
if [ -z "$fixedfeatures" ]; then
echo "* No fixed features."
else
echo "$fixedfeatures"
fi
echo ""
echo "Deleted Features:"
if [ -z "$deletedfeatures" ]; then
echo "* No deleted features."
else
echo "$deletedfeatures"
fi
echo ""