1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From: Roland Clobus <rclobus@rclobus.nl>
Date: Sat, 8 Feb 2025 23:03:59 +0100
Subject: use Debian changelog to discover a version to show
This is (a slightly modified version of) the patch from Roland's
bug report #1077069
[git-debrebase split: mixed commit: upstream part]
---
lib/OpenQA/Utils.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/OpenQA/Utils.pm b/lib/OpenQA/Utils.pm
index 8a8763a..8dfc070 100644
--- a/lib/OpenQA/Utils.pm
+++ b/lib/OpenQA/Utils.pm
@@ -666,7 +666,11 @@ sub detect_current_version ($path) {
if (-e $changelog_file) {
my $changelog = $changelog_file->slurp;
- if ($changelog && $changelog =~ /Update to version (\d+\.\d+\.(\b[0-9a-f]{5,40}\b))\:/mi) {
+ if (
+ $changelog
+ && ( $changelog =~ /Update to version (\d+\.\d+\.(\b[0-9a-f]{5,40}\b))\:/mi
+ || $changelog =~ /^openqa \(([^)]+)/mi))
+ {
$current_version = $1;
}
}
|