pulsebridge-app/scripts/changelog

21 lines
450 B
Text
Raw Normal View History

2024-03-07 01:32:21 +05:30
#!/bin/bash -eu
versions() {
git tag | grep '^v' | sort --field-separator=. --key=1,1nr --key=2,2nr --key=3,3nr
}
if [[ $# > 0 ]]; then
current="$1"
else
current="$(versions | head -n1)"
fi
if [[ $# > 1 ]]; then
previous="$2"
else
previous="$(versions | head -n2 | tail -n1)"
fi
echo "Changelog $previous -> $current"
echo "=========================="
git log "${previous}..${current}" --pretty=oneline | cut -d' ' -f2- | sed -E -e 's/^/* /'