mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
misc: added changelog.sh script
This commit is contained in:
parent
3c400d2905
commit
5253add531
1 changed files with 60 additions and 0 deletions
60
changelog.sh
Executable file
60
changelog.sh
Executable file
|
@ -0,0 +1,60 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
NEW=()
|
||||||
|
FIXES=()
|
||||||
|
MISC=()
|
||||||
|
|
||||||
|
echo "@ Fetching remote tags ..."
|
||||||
|
|
||||||
|
git fetch --tags > /dev/null
|
||||||
|
|
||||||
|
CURTAG=$(git describe --tags --abbrev=0)
|
||||||
|
OUTPUT=$(git log $CURTAG..HEAD --oneline)
|
||||||
|
# https://stackoverflow.com/questions/19771965/split-bash-string-by-newline-characters
|
||||||
|
IFS=$'\n' LINES=($OUTPUT)
|
||||||
|
|
||||||
|
for LINE in "${LINES[@]}"; do
|
||||||
|
LINE=$(echo "$LINE" | sed -E "s/^[[:xdigit:]]+\s+//")
|
||||||
|
if [[ $LINE = *"new:"* ]]; then
|
||||||
|
NEW+=("$LINE")
|
||||||
|
elif [[ $LINE = *"fix:"* ]]; then
|
||||||
|
FIXES+=("$LINE")
|
||||||
|
elif [[ $LINE != *"i did not bother commenting"* ]]; then
|
||||||
|
echo "MISC LINE =$LINE"
|
||||||
|
MISC+=("$LINE")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Changelog"
|
||||||
|
echo "==="
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ -n "$NEW" ]; then
|
||||||
|
echo "**New Features**"
|
||||||
|
echo
|
||||||
|
for l in "${NEW[@]}"
|
||||||
|
do
|
||||||
|
echo "* $l"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$FIXES" ]; then
|
||||||
|
echo "**Fixes**"
|
||||||
|
echo
|
||||||
|
for l in "${FIXES[@]}"
|
||||||
|
do
|
||||||
|
echo "* $l"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$MISC" ]; then
|
||||||
|
echo "**Misc**"
|
||||||
|
echo
|
||||||
|
for l in "${MISC[@]}"
|
||||||
|
do
|
||||||
|
echo "* $l"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
Loading…
Add table
Add a link
Reference in a new issue