From 65b154355a8b3c0d8b924d20fcd020733ea2581d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 7 Apr 2025 14:14:37 +0200 Subject: [PATCH] Test/unit-tests: handle dot releases when parsing Source0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Hozza --- tests/unit-tests/run-unit-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/run-unit-tests.sh b/tests/unit-tests/run-unit-tests.sh index a899790..7d7c4bb 100755 --- a/tests/unit-tests/run-unit-tests.sh +++ b/tests/unit-tests/run-unit-tests.sh @@ -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}"