summaryrefslogtreecommitdiff
path: root/utils/build-releasenote
blob: 1b832a43cb33a71b7c3c987e47212a15bce5aca3 (plain)
  1. #!/bin/bash
  2. VERSION=`head -n1 debian/changelog | sed 's/.*(\([^)]*\)).*/\1/'`
  3. {
  4. sed "s/__VERSION__/$VERSION/g" < utils/releasenote.header
  5. head -n$(( $(grep -n '^ --' debian/changelog | head -n1 | cut -f1 -d:) - 2 )) debian/changelog | tail -n+3
  6. sed "s/__VERSION__/$VERSION/g" < utils/releasenote.footer
  7. } > "website/news/release-$VERSION.mdwn"
  8. git add "website/news/release-$VERSION.mdwn"
  9. checksums() {
  10. echo "checksums for the monkeysphere ${VERSION%%-*} release:"
  11. echo
  12. echo "MD5:"
  13. md5sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  14. echo
  15. echo "SHA1:"
  16. sha1sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  17. echo
  18. echo "SHA256:"
  19. sha256sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  20. }
  21. checksums
  22. temprelease=$(mktemp ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX)
  23. trap "rm -f $temprelease" EXIT
  24. set -e
  25. head -n$(( $(grep -n '^-----BEGIN PGP SIGNED MESSAGE-----$' website/download.mdwn | head -n1 | cut -f1 -d:) - 1 )) website/download.mdwn >$temprelease
  26. checksums | gpg --no-tty --clearsign --default-key EB8AF314 >>$temprelease
  27. cat utils/download.mdwn.footer >>$temprelease
  28. mv "$temprelease" website/download.mdwn
  29. trap - EXIT
  30. set +e
  31. git add website/download.mdwn
  32. gpg --verify website/download.mdwn