Update DrupalorgVersioncontrolLabelVersionMapperGit for semantic versioning in contrib
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2189131. -->
Reported by: [ergonlogic](https://www.drupal.org/user/368613)
>>>
<p>This issue is intended to be complimentary to <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/drupalorg/-/work_items/2173779" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/drupalorg/-/work_items/2173779</a></span>, though they may end up altering some of the same regexes. It's also intended to be more focused and short-term than the discussion going on in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/1612910" title="Status: Closed (fixed)">#1612910: [policy, no patch] Switch to Semantic Versioning for Drupal contrib extensions (modules, themes, etc)</a></span>, which is a pretty major bikeshed.</p>
<p>Over in the Aegir project, we'd very much like to be able to <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/hostmaster/issues/2168955" title="Status: Closed (fixed)">#2168955: switch to semantic versionning</a></span>. We're fine with 7.x-3.x.y for the time-being, and 8.x.y-4.x.y (or whatever) down the road. In <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/infrastructure/issues/2170443" title="Status: Closed (fixed)">#2170443: [meta] Create a plan for implementing semantic versioning for core</a></span>, webchick posted a list of places where changes may be required to support re-numbering the Drupal core version. Some subset of these will need work to support semver for contrib.</p>
<p>I'll post a patch shortly that allows semver for contrib in DrupalorgVersioncontrolLabelVersionMapperGit. I've also looked through Update Status module, which shouldn't require any modification for this. I'll keep working through the list, and post any relevant findings here (unless a meta issue for this is in order.)</p>
<h3>Tasks</h3>
<ul>
<li>✅ Done - Deploy <a href="https://git.drupalcode.org/project/versioncontrol_project/commit/cf52b05">https://git.drupalcode.org/project/versioncontrol_project/commit/cf52b05</a></li>
<li>✅ Done - Make the changes to <code>DrupalorgVersioncontrolLabelVersionMapperGit</code> & deploy.</li>
<li>✅ Done - Build something to prevent conflicting versions.</li>
<li><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/project_composer/-/issues/3104684" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/project_composer/-/issues/3104684</a></span></li>
<li><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/project/issues/3110860" title="Status: Closed (fixed)">#3110860: Allow restricting “supportable” branches</a></span>, <code>$conf['project_release_supportable_branch_pattern'] = '/^(.*\.x-|\d+\.)\d+\.$/';</code></li>
<li>✅ Done - <a href="https://www.drupal.org/project/semver_example">https://www.drupal.org/project/semver_example</a> - Make an example project with a variety of legacy and semver releases including: 8.x-1.x-dev, 8.x-1.0, 2.x-dev, 2.0.0, 2.1.x-dev, 2.1.0-beta1</li>
</ul>
> Related issue: [Issue #3104684](https://www.drupal.org/node/3104684)
issue
GitLab AI Context
Project: project/drupalorg
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/drupalorg/-/raw/1.0.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/drupalorg
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD