Verified Commit c875abc7 by Paul Wise

Do not anchor the __version__ regex at line start/end

The match appears to occur across all lines.

Also disable insensitive matching since Python uses lowercase.
parent 4ded7163
......@@ -748,7 +748,7 @@ elsif( $upstream_param =~ m%^github_commits_package_json/($github_project_char_r
my $package_json = JSON::decode_json( $response->decoded_content );
$version = %{$package_json}{version} if $package_json;
} elsif ($type_param eq '__version__'){
($version) = $response->decoded_content =~ m{^\s*__version__\s*=\s*['"]([^"']+)["']\s*$}i;
($version) = $response->decoded_content =~ m{__version__\s*=\s*["']([^"']+)["']};
} elsif ($type_param eq 'cmake'){
($version) = $response->decoded_content =~ m{set\([a-z0-9]+_version +"([^"]+)"\)}i;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment