justfile: Add a recipe to check for comps sync changes

Will be used by Zuul CI.
This commit is contained in:
Timothée Ravier 2024-03-28 18:10:26 +01:00
parent 3672bbd10c
commit abd2d7c6df

View file

@ -71,6 +71,24 @@ comps-sync:
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${default_variant}.yaml | jq -r '."mutate-os-release"')"
./comps-sync.py --save fedora-comps/comps-f${version}.xml.in
# Check if the manifests are in sync with the content of the comps groups
comps-sync-check:
#!/bin/bash
set -euo pipefail
if [[ ! -d fedora-comps ]]; then
git clone https://pagure.io/fedora-comps.git
else
pushd fedora-comps > /dev/null || exit 1
git fetch
git reset --hard origin/main
popd > /dev/null || exit 1
fi
default_variant={{default_variant}}
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${default_variant}.yaml | jq -r '."mutate-os-release"')"
./comps-sync.py fedora-comps/comps-f${version}.xml.in
# Output the processed manifest for a given variant (defaults to Silverblue)
manifest variant=default_variant:
#!/bin/bash