#!/usr/bin/env bash set -euo pipefail # Makes sure that is_release_build is only set to yes in a release commit. A # release commit must be titled: "Release $MAJOR.$MINOR". Also checks that the # release version in the build system matches the commit msg. # if running under PAPR, use the branch/PR HEAD actually # being tested rather than the merge sha HEAD=${PAPR_COMMIT:-HEAD} git log --format=%B -n 1 $HEAD > log.txt trap "rm -f version.m4 log.txt" EXIT if grep -q ^is_release_build=yes configure.ac; then echo "*** is_release_build is set to yes ***" # assemble a short m4 macro file to evaluate 'package_version' cat > version.m4 <> version.m4 cat >> version.m4 <