#!/bin/bash set -eu die() { echo "$@" >&2 exit 1 } usage() { cat >&2 </dev/null 2>&1 git rev-parse --verify -q origin/$head >/dev/null 2>&1 if [ -n "$(git rev-list $head..origin/$head)" ]; then die "$head is not up to date. Aborting." fi [ -e Makefile.in ] || autoreconf -fvi [ -e config.status ] || ./configure make -j4 distcheck VERSION="$VERS" echo 'Checking distributed files against Git:' if comm -3 <(tar -tzf "$TAG.tar.gz" | grep -v '/$' | sed "s%^$TAG/%%" | sort) \ <(git ls-files | sort) | grep -vxf scripts/dist-ignore; then echo echo 'Error: Please fix Makefile.am and/or scripts/dist-ignore.' exit 1 fi echo 'ok' mv "$TAG.tar.gz" "$TGZ.tgz" if ! [ "$no_tag" ]; then if git cat-file -t "$TAG" > /dev/null 2>&1; then die "Error: Object $TAG already exists." fi git tag -s -m "BarnOwl $VERS" "$TAG" else TAG=HEAD fi echo "Created release tarball for BarnOwl $VERS at $(pwd)/$TGZ.tgz" echo "Remember to bump OWL_VERSION_STRING for future development." COMMIT=$(git rev-parse "$TAG") NOW=$(date +"%B %d, %Y") cat <