test: tweak cross-build.sh test to look at latest released images

This commit tweaks the `cross-build.sh` to checkout the last release
tag of the images library instead of using main. The issue with using
main is that there are many false positive errors when e.g. a new
fedora release is added to main.

Ideally it would use the tag of the vendored images library but
this particular test looks at the rpm content so the information
what version of images was used is not readily available (we could
fix this but the workaround of this commit is hopefully sufficient).
This commit is contained in:
Michael Vogt 2025-02-19 10:27:15 +01:00 committed by Achilleas Koutsou
parent f237af9bda
commit 2fc64aeaca

View file

@ -103,8 +103,12 @@ else
echo "All installed distros are recognized by composer."
fi
# set path to all "images" repositories
git clone --depth 1 http://github.com/osbuild/images
# set path to all "images" repositories, do not use "main" here but the
# last release version (this assume 200 commits since the last tag)
git clone --depth 200 http://github.com/osbuild/images
( cd images &&
git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")"
)
REPO_PATH="images/data/repositories/"
# ALL_DISTROS - all possible distros from upstream repository