update: Guidlines and test script for git commit based release notes
This commit is contained in:
parent
caa4513920
commit
ed117d6195
2 changed files with 38 additions and 9 deletions
|
|
@ -7,9 +7,11 @@ Best practices and guidelines for writing code documentation.
|
||||||
The idea is to get rather automated release notes. To have this as easy as possible, we need:
|
The idea is to get rather automated release notes. To have this as easy as possible, we need:
|
||||||
|
|
||||||
- key words for the kind of change we applied:
|
- key words for the kind of change we applied:
|
||||||
- `feature:` - for newly added functionality
|
- `new:` - for newly added functionality
|
||||||
- `fix:` - for bugfixes
|
- `update:` - for updated functionality
|
||||||
- `nonotes:` - for git commits we don't want to see in the release notes
|
- `fix:` - for fixed functionality
|
||||||
|
- `delete:` - for removed functionality
|
||||||
|
- Everything else will be ignored
|
||||||
|
|
||||||
- tags for each version, we will output only the change log from the last and second last tag
|
- tags for each version, we will output only the change log from the last and second last tag
|
||||||
- you can add tags with `git tag -a <tag> -m "<message>"`
|
- you can add tags with `git tag -a <tag> -m "<message>"`
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,40 @@ echo ""
|
||||||
echo "Release Notes from $secondLastTag to $latestTag:"
|
echo "Release Notes from $secondLastTag to $latestTag:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Separate features and fixes
|
# Separate types of commits
|
||||||
features=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'feature:' | sed 's/feature:/* /g' | sort | uniq)
|
newfeatures=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'new:' | sed 's/new:/* /g' | sort | uniq)
|
||||||
fixes=$(git log "$secondLastTag".."$latestTag" --pretty=format:"%s" | grep 'fix:' | sed 's/fix:/* /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 "New Features:"
|
||||||
echo "$features"
|
if [ -z "$newfeatures" ]; then
|
||||||
|
echo "* No new features."
|
||||||
|
else
|
||||||
|
echo "$newfeatures"
|
||||||
|
fi
|
||||||
echo ""
|
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 ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue