1
0
mirror of https://github.com/mfontanini/presenterm.git synced 2026-09-01 23:33:21 -06:00
presenterm/scripts/parse-changelog.sh
2024-01-26 15:10:53 -08:00

18 lines
304 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ $# -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
version=$1
if ! grep "^# ${version}" CHANGELOG.md >/dev/null; then
echo "Version ${version} not found in changelog"
exit 1
fi
sed -n "/^# ${version}/,/^# /{/^# ${version}/p;/^# /b;p}" CHANGELOG.md