From b3c1b8f9e99ffe66dddcf3fd011a28e062257b51 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 8 Aug 2023 17:21:51 +0200 Subject: [PATCH] fix bug checking remote tag info of format string_major_minor_patch --- App/tools/getVersion.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/App/tools/getVersion.pl b/App/tools/getVersion.pl index f0ecfeb..8b5797a 100755 --- a/App/tools/getVersion.pl +++ b/App/tools/getVersion.pl @@ -229,6 +229,12 @@ sub parse_git_output { } elsif ($line =~ /On branch/) { } + elsif ($line =~/([0-9a-fA-F]+)[ \t]+refs\/tags\//) { + $remotetagcommit = $1; + if ($debug) { + say STDERR "Remote commit $remotetagcommit"; + } + } elsif ($line =~ /^([0-9]+)\.([0-9]+)(\.([0-9]+))?$/) { $tag = $line; my $major = $1; @@ -264,17 +270,17 @@ sub parse_git_output { $remote = $1; $branch = $2; } - elsif ($line =~/([0-9a-fA-F]+)[ \t]+refs\/tags\//) { - $remotetagcommit = $1 - } elsif ($line =~/\* [^ ]+ +([0-9a-fA-F]+) \[(.*)\/([^:]*).*\]/) { $commit = $1; $remote = $2; $branch = $3; if ($debug) { - say STDERR 'Commit $commit on branch $branch on remote "$remote"'; + say STDERR "Commit $commit on branch $branch on remote $remote"; } } + elsif ($debug) { + say STDERR "unparsed: $line"; + } } }