From 05771ca5e67362096166bad4912a38e13ae9936d Mon Sep 17 00:00:00 2001 From: Matti Viljanen Date: Wed, 10 Aug 2022 00:33:53 +0300 Subject: [PATCH] Print changelog at the end of the build script --- build-rpms.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build-rpms.sh b/build-rpms.sh index 115ea8b..0d534d5 100755 --- a/build-rpms.sh +++ b/build-rpms.sh @@ -11,7 +11,7 @@ export APP_NAME=$(grep "Name" $(find . -regextype egrep -regex "\.\/rpm\/[a-z0-9 export SFOS_VER=4.4.0.58 ########## -# Paths +# Paths and versions ########## export ORIG_PATH=$PATH @@ -20,6 +20,9 @@ export PRO_FILE=$PROJECT/$APP_NAME.pro export SHADOW=$PROJECT/shadow export RPM_DEST_DIR=$PROJECT/RPMS +export APP_VER=$(grep "Version" $(find . -regextype egrep -regex "\.\/rpm\/[a-z0-9_-]*\.(yaml|spec)" -print | head -1) | awk '{print $2}') +export APP_REL=$(grep "Release" $(find . -regextype egrep -regex "\.\/rpm\/[a-z0-9_-]*\.(yaml|spec)" -print | head -1) | awk '{print $2}') + ########## # Build function. Ran once per architecture ########## @@ -100,6 +103,12 @@ export RPM_FILE=$(ls RPMS/*$RPM_ARCH.rpm | head -1) if [ -f "$RPM_FILE" ] then $HOME/SailfishOS/bin/sfdk engine exec rpmvalidation -t SailfishOS-$SFOS_VER-$ARCH.default $(ls RPMS/*$RPM_ARCH.rpm | head -1) + echo + echo "Changelog:" + echo + echo ${APP_VER}-${APP_REL} + sed '/^$/Q' rpm/${APP_NAME}.changes | tail +2 | cut -c3- + echo else echo "RPM package not found, not validating." fi