From d573b8dc2f8eb11068e40d93aa54c9794bfce6bb Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Fri, 9 Jul 2021 16:17:31 +0000 Subject: [PATCH] ci/release-build: evaluate package_version from m4 definition This fixes the ci-release-build.sh script to directly source and evaluate 'package_version' from its m4 definition, without requiring a fully configured source tree. --- ci/ci-release-build.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ci/ci-release-build.sh b/ci/ci-release-build.sh index e7e7f111fc..ca60a4a370 100755 --- a/ci/ci-release-build.sh +++ b/ci/ci-release-build.sh @@ -10,14 +10,26 @@ set -euo pipefail HEAD=${PAPR_COMMIT:-HEAD} git log --format=%B -n 1 $HEAD > log.txt -trap "rm -f log.txt" EXIT +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 ***" - V=$(grep -Po '^#define PACKAGE_VERSION "\K[0-9]+\.[0-9]+(?=")' config.h) + # assemble a short m4 macro file to evaluate 'package_version' + cat > version.m4 <> version.m4 + + cat >> version.m4 <