#!/bin/sh set -e VERSION="@PACKAGE_VERSION@" TARBALL="@PACKAGE_NAME@-$VERSION" echo "[+] building release tarballs" make clean make dist-gzip if [ ! -e "$TARBALL.tar.gz" ] then >&2 echo "[!] Expected to find ${TARBALL}.tar.gz, but it wasn't found." >&2 echo " Cannot proceed, aborting." exit 1 fi make dist-zip if [ ! -e "$TARBALL.zip" ] then >&2 echo "[!] Expected to find ${TARBALL}.zip, but it wasn't found." >&2 echo " Cannot proceed, aborting." exit 1 fi mv "${TARBALL}.tar.gz" "@PACKAGE_NAME@-release.tar.gz" mv "${TARBALL}.zip" "@PACKAGE_NAME@-release.zip" echo "[+] building release notes" RELEASE_NOTES_AWK="/^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)? \([0-9]{4}-[0-9]{2}-[0-9]{2}\):/{ nmatch++; if (nmatch>1) exit } { if (nmatch>0) print \$0; }" awk "$RELEASE_NOTES_AWK" CHANGELOG > RELEASE_NOTES echo "[+] release is ready"