mirror of
https://invent.kde.org/packaging/yocto-meta-kf5.git
synced 2026-09-14 03:49:36 +02:00
Use git checkouts for obtaining metainfo data
This commit is contained in:
@@ -55,12 +55,18 @@ remove)
|
|||||||
;;
|
;;
|
||||||
metainfo)
|
metainfo)
|
||||||
echo "Updating metainfo..."
|
echo "Updating metainfo..."
|
||||||
|
tmpdir="$PWD/tmp"
|
||||||
|
if [ -d "$tmpdir" ]; then
|
||||||
|
echo "Temporary directory $tmpdir exists, remove it before running script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mkdir -p $tmpdir
|
||||||
for recipe in `find $base -regex ".*/[0-9a-zA-Z\-]+\.inc" | grep -v /staging/`; do
|
for recipe in `find $base -regex ".*/[0-9a-zA-Z\-]+\.inc" | grep -v /staging/`; do
|
||||||
framework=`echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=\.inc)'`
|
framework=`echo $recipe | grep -P -o '[0-9a-zA-Z\-]+(?=\.inc)'`
|
||||||
filename=`echo $recipe | sed -e "s,\.inc,_metainfo\.inc,"`
|
filename=`echo $recipe | sed -e "s,\.inc,_metainfo\.inc,"`
|
||||||
url="https://invent.kde.org/frameworks/$framework/-/raw/v$version/metainfo.yaml"
|
url="https://invent.kde.org/frameworks/$framework.git"
|
||||||
curl $url > /tmp/$framework
|
git clone -c advice.detachedHead=false -q --depth 1 --branch v$version $url $tmpdir/$framework > /dev/null
|
||||||
description=$(yaml /tmp/$framework "description")
|
description=$(yaml $tmpdir/$framework/metainfo.yaml "description")
|
||||||
if [[ $description == "" ]] ; then
|
if [[ $description == "" ]] ; then
|
||||||
echo "WARNING: no description for $framework"
|
echo "WARNING: no description for $framework"
|
||||||
fi
|
fi
|
||||||
@@ -72,6 +78,7 @@ SUMMARY ?= "$description"
|
|||||||
HOMEPAGE ?= "https://api.kde.org/frameworks/$framework/html/index.html"
|
HOMEPAGE ?= "https://api.kde.org/frameworks/$framework/html/index.html"
|
||||||
EOM
|
EOM
|
||||||
git add $filename
|
git add $filename
|
||||||
|
echo "$framework: DONE"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user