fix bug checking remote tag info of format string_major_minor_patch

This commit is contained in:
2023-08-08 17:21:51 +02:00
parent 08d12526b1
commit b3c1b8f9e9
+10 -4
View File
@@ -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";
}
}
}