Test/unit-tests: handle dot releases when parsing Source0

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-04-07 14:14:37 +02:00
parent eb27aa4849
commit 65b154355a
No known key found for this signature in database
GPG Key ID: C5887AD51D9F3C2D

View File

@ -57,7 +57,7 @@ fi
cd "${TMT_SOURCE_DIR}"
# Extract the Source0 basename without extension
SRC_DIR=$(spectool --source 0 osbuild.spec | sed 's/.\+\(osbuild-[0-9]\+\)\.tar\.gz/\1/')
SRC_DIR=$(spectool --source 0 osbuild.spec | sed -E 's|.*/([^/]*)\.tar\.gz$|\1|')
# Move to the extracted sources directory (patches are applied by default)
cd "${SRC_DIR}"