diff --git a/ci/commit-beta-changelog.sh b/ci/commit-beta-changelog.sh index b1bd2860..74e7568d 100755 --- a/ci/commit-beta-changelog.sh +++ b/ci/commit-beta-changelog.sh @@ -8,3 +8,5 @@ sed "s/Unreleased/$VERSION Beta $BUILD ($DATE)/" $TARGET >$TARGET.tmp mv $TARGET.tmp $TARGET git add $TARGET git commit -m "Set beta release" + +ci/latest-changelog.sh >ci/$TARGET diff --git a/ci/latest-changelog.sh b/ci/latest-changelog.sh new file mode 100755 index 00000000..7240b6c7 --- /dev/null +++ b/ci/latest-changelog.sh @@ -0,0 +1,6 @@ +#!/bin/sh +TARGET="CHANGELOG.md" +RELEASES=(`grep -n "^## " $TARGET | sed -E "s/^([0-9]+).*$/\1/g"`) +UNRELEASED=${RELEASES[0]} +LATEST=${RELEASES[1]} +cat $TARGET | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2))