diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-08-01 19:59:26 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-08-01 20:18:13 (EDT) |
commit | 057f0b996face5e4ab6dbfb7351fa2b2144cb1e2 (patch) | |
tree | 5c7e837b2b5659a85cd5c500ee7cdd31fa54c4d0 | |
parent | cb29cad751089ceaa8bd72d5dc6e47174995ae6e (diff) |
build: Support announcing first version
-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} |