From 2fc64aeaca9d8c410d5f27a722f167de8ecd5a49 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Feb 2025 10:27:15 +0100 Subject: [PATCH] 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). --- test/cases/cross-distro.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/cases/cross-distro.sh b/test/cases/cross-distro.sh index 7b6af8251..0e364c540 100755 --- a/test/cases/cross-distro.sh +++ b/test/cases/cross-distro.sh @@ -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