From 89c2b2ea5fccdb1360b005573d08728951dc8ffd Mon Sep 17 00:00:00 2001 From: Andreas Cord-Landwehr Date: Sun, 25 Sep 2022 09:27:18 +0200 Subject: [PATCH] Switch to fixed revisions when creating recipe by tag --- scripts/plasma-release.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/plasma-release.sh b/scripts/plasma-release.sh index 5895973..3b926e4 100755 --- a/scripts/plasma-release.sh +++ b/scripts/plasma-release.sh @@ -23,16 +23,21 @@ base=`dirname $0`/../recipes-plasma case $command in add) - for recipe in `find $base -name "*.inc" | grep -v /staging/`; do - name=`echo $recipe | sed -e "s,\.inc,_${version}.bb,"` + for recipe in $(find $base -name "*.inc" | grep -v /staging/); do + name=$(echo $recipe | sed -e "s,\.inc,_${version}.bb,") app=$(echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=\.inc)') + lsremote=$(git ls-remote --exit-code https://anongit.kde.org/${app} v${version}) + if [ $? -eq 2 ]; then + echo "No remote tag found for ${app}, recipe will be invalid" + fi + revision=$(echo ${lsremote} | cut -d ' ' -f1) cat < $name # SPDX-FileCopyrightText: none # SPDX-License-Identifier: CC0-1.0 require \${PN}.inc SRC_URI = "git://anongit.kde.org/${app};nobranch=1;protocol=https" -SRCREV = "v\${PV}" +SRCREV = "${revision}" S = "\${WORKDIR}/git" EOM git add $name