From 2bb4fdeabaf16d66c68ea92c3f332945ea7b53c4 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 5 Sep 2008 18:46:41 -0400 Subject: [PATCH] scripts to "make releasenote" to make my life easier. --- Makefile | 5 ++++- utils/build-releasenote | 40 ++++++++++++++++++++++++++++++++++++++ utils/download.mdwn.footer | 1 + utils/releasenote.footer | 3 +++ utils/releasenote.header | 9 +++++++++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 utils/build-releasenote create mode 100644 utils/download.mdwn.footer create mode 100644 utils/releasenote.footer create mode 100644 utils/releasenote.header diff --git a/Makefile b/Makefile index 765c3e9..defd15a 100644 --- a/Makefile +++ b/Makefile @@ -45,4 +45,7 @@ install: all install man/man8/* $(DESTDIR)$(PREFIX)/share/man/man8 install -m 0644 etc/* $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere -.PHONY: all clean tarball debian-package install +releasenote: + ./utils/build-releasenote + +.PHONY: all clean tarball debian-package install releasenote diff --git a/utils/build-releasenote b/utils/build-releasenote new file mode 100755 index 0000000..af7ceb3 --- /dev/null +++ b/utils/build-releasenote @@ -0,0 +1,40 @@ +#!/bin/bash + +VERSION=`head -n1 debian/changelog | sed 's/.*(\([^)]*\)).*/\1/'` + +{ + sed "s/__VERSION__/$VERSION/g" < utils/releasenote.header + head -n$(( $(grep -n '^ --' debian/changelog | head -n1 | cut -f1 -d:) - 2 )) debian/changelog | tail -n+3 + sed "s/__VERSION__/$VERSION/g" < utils/releasenote.footer +} > "website/news/release-$VERSION.mdwn" + +git add "website/news/release-$VERSION.mdwn" + +checksums() { + echo "checksums for the monkeysphere ${VERSION%%-*} release:" + echo + echo "MD5:" + md5sum "monkeysphere_${VERSION%%-*}.orig.tar.gz" + echo + echo "SHA1:" + sha1sum "monkeysphere_${VERSION%%-*}.orig.tar.gz" + echo + echo "SHA256:" + sha256sum "monkeysphere_${VERSION%%-*}.orig.tar.gz" +} + +checksums + +temprelease=$(mktemp) +trap "rm -f $temprelease" EXIT +set -e +head -n$(( $(grep -n '^-----BEGIN PGP SIGNED MESSAGE-----$' website/download.mdwn | head -n1 | cut -f1 -d:) - 1 )) website/download.mdwn >$temprelease +checksums | gpg --no-tty --clearsign --default-key EB8AF314 >>$temprelease +cat utils/download.mdwn.footer >>$temprelease +mv "$temprelease" website/download.mdwn +trap - EXIT +set +e + +git add website/download.mdwn + +gpg --verify website/download.mdwn diff --git a/utils/download.mdwn.footer b/utils/download.mdwn.footer new file mode 100644 index 0000000..95bc788 --- /dev/null +++ b/utils/download.mdwn.footer @@ -0,0 +1 @@ + diff --git a/utils/releasenote.footer b/utils/releasenote.footer new file mode 100644 index 0000000..640e765 --- /dev/null +++ b/utils/releasenote.footer @@ -0,0 +1,3 @@ + + +[[Download]] it now! diff --git a/utils/releasenote.header b/utils/releasenote.header new file mode 100644 index 0000000..f08012c --- /dev/null +++ b/utils/releasenote.header @@ -0,0 +1,9 @@ +[[meta title="MonkeySphere __VERSION__ released!"]] + +# MonkeySphere __VERSION__ released! # + +MonkeySphere __VERSION__ has been released. + +From the changelog: + +
-- 
2.26.2