Commit 8b5fe470 authored by drumm's avatar drumm
Browse files

Issue #3300663: Match abbreviated commit hashes with more than 7 characters

parent f1490f08
......@@ -217,7 +217,7 @@ class DrupalorgProjectPackageRelease implements ProjectReleasePackagerInterface
$version_regex .= '\d+\.';
}
$matches = [];
if (preg_match('/^(?<drupalversion>' . $version_regex . '\d+(?:-[^-]+)?)(?<gitextra>-(?<numberofcommits>\d+-)g[0-9a-f]{7})?$/', $last_tag[0], $matches)) {
if (preg_match('/^(?<drupalversion>' . $version_regex . '\d+(?:-[^-]+)?)(?<gitextra>-(?<numberofcommits>\d+-)g[0-9a-f]{7,})?$/', $last_tag[0], $matches)) {
// If we found additional git metadata (in particular, number of
// commits) then use that info to build the version string.
if (isset($matches['gitextra'])) {
......
Supports Markdown
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