summaryrefslogtreecommitdiff
path: root/utils/build-releasenote
blob: 1dee649752008ef0405cf44e05c86a16dd891bbb (plain)
  1. #!/bin/bash
  2. VERSION=`head -n1 packaging/debian/changelog | sed 's/.*(\([^)]*\)).*/\1/'`
  3. {
  4. sed "s/__VERSION__/$VERSION/g" < utils/releasenote.header
  5. head -n$(( $(grep -n '^ --' packaging/debian/changelog | head -n1 | cut -f1 -d:) - 2 )) packaging/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 | \
  26. 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
  27. checksums | gpg --no-tty --clearsign --default-key EB8AF314 >>$temprelease
  28. cat utils/download.mdwn.footer >>$temprelease
  29. mv "$temprelease" website/download.mdwn
  30. trap - EXIT
  31. set +e
  32. git add website/download.mdwn
  33. gpg --verify website/download.mdwn
  34. printf "please remember to add the new version to the bugtracker:\n https://labs.riseup.net/code/projects/settings/monkeysphere\n"