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:11:07 +02:00
parent a60bb2f04a
commit e05f62d8c0
No known key found for this signature in database
GPG Key ID: C5887AD51D9F3C2D

View File

@ -66,7 +66,7 @@ fi
${PKG_MAINT_TOOL} -v --namespace rpms --name osbuild --release "${DIST_GIT_RELEASE}" prep
# 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|')
cd "${SRC_DIR}"