diff options
-rwxr-xr-x | scripts/announce-release.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/announce-release.sh b/scripts/announce-release.sh index f27e0cb..ae26070 100755 --- a/scripts/announce-release.sh +++ b/scripts/announce-release.sh @@ -46,8 +46,10 @@ news="$(sed -n ' }; ' "${srcdir}/NEWS")" old_version="$(sed -n "/^${package_name} version /p;" "${srcdir}/NEWS" | \ - sed -n "2{ s/^${package_name} version //p; };")" -old_tag="$(git tag --sort=creatordate | tail -n 2 | head -n 1)" + sed -n "2{ s/^${package_name} version / Since Version /p; };")" +old_tag="$(git tag --sort=-creatordate | sed -n '2{p;q;}')" +# Empty tree SHA-1 hash: +[ -z "${old_tag}" ] && old_tag='4b825dc642cb6eb9a060e54bf8d69288fbee4904' export GIT_DIR="${srcdir}/.git" @@ -111,11 +113,11 @@ message="$({ cat | sed 's/=/=3D/g; s/ $/=20/; s/\t$/=09/;'; } <<-EOF ${news} - $(heading "Shortlog of Changes Since Version ${old_version}") + $(heading "Shortlog of Changes${old_version}") ${shortlog} - $(heading "Diffstat of Changes Since Version ${old_version}") + $(heading "Diffstat of Changes${old_version}") ${diffstat} |