summaryrefslogtreecommitdiff
path: root/utils/build-releasenote
blob: cac08694139fea89926e408ff74b22c6008e2c47 (plain)
  1. #!/bin/bash
  2. # script to build a release announcement for the Monkeysphere
  3. # if you're running this, you probably also want to read through
  4. # the checklist in utils/preparing-release.
  5. # Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  6. # Copyright: © 2008-2010
  7. # License: GPL, v3 or later
  8. VERSION=`head -n1 changelog | sed 's/.*(\([^)]*\)).*/\1/'`
  9. {
  10. sed "s/__VERSION__/$VERSION/g" < utils/releasenote.header
  11. head -n$(( $(grep -n '^ --' changelog | head -n1 | cut -f1 -d:) - 2 )) changelog | tail -n+3
  12. sed "s/__VERSION__/$VERSION/g" < utils/releasenote.footer
  13. } > "website/news/release-$VERSION.mdwn"
  14. git add "website/news/release-$VERSION.mdwn"
  15. checksums() {
  16. echo "checksums for the monkeysphere ${VERSION%%-*} release:"
  17. echo
  18. echo "MD5:"
  19. md5sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  20. echo
  21. echo "SHA1:"
  22. sha1sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  23. echo
  24. echo "SHA256:"
  25. sha256sum "monkeysphere_${VERSION%%-*}.orig.tar.gz"
  26. }
  27. checksums
  28. temprelease=$(mktemp ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX)
  29. trap "rm -f $temprelease" EXIT
  30. set -e
  31. head -n$(( $(grep -n '^-----BEGIN PGP SIGNED MESSAGE-----$' website/download.mdwn | head -n1 | cut -f1 -d:) - 1 )) website/download.mdwn | \
  32. sed -e 's|http://archive\.monkeysphere\.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_[[:digit:].]\+\.orig\.tar\.gz|http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_'"${VERSION%%-*}"'.orig.tar.gz|g' >$temprelease
  33. checksums | gpg --no-tty --clearsign --default-key EB8AF314 >>$temprelease
  34. cat utils/download.mdwn.footer >>$temprelease
  35. mv "$temprelease" website/download.mdwn
  36. trap - EXIT
  37. set +e
  38. git add website/download.mdwn
  39. gpg --verify website/download.mdwn
  40. printf "please remember to add the new version to the bugtracker:\n https://labs.riseup.net/code/projects/settings/monkeysphere\n"