Prepare XB for frequent releases: `scripts/tag-release.sh`
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3509451. --> Reported by: [wim leers](https://www.drupal.org/user/99777) Related to !732 >>> <h3 id="overview">Overview</h3> <p>We're tagging <code>0.2.0-alpha1</code> today, for <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3455753" title="Status: Closed (fixed)">#3455753: Milestone 0.2.0: Early preview</a></span>.</p> <p>Why not <code>0.2.0-alpha</code> or even <code>0.2.0</code>?</p> <ul> <li><code>0.2.0-alpha</code>: no, because <a href="https://www.drupal.org/node/1015226#s-stable-releases-and-pre-releases">d.o requires pre-releases to be numbered</a> &#129335; </li><li><code>0.2.0</code>: no, because this <a href="https://www.drupal.org/node/1015226#s-stable-releases-and-pre-releases:~:text=Tags%20which%20end%20in%20a%20number%2C%20without%20the%20%2D%E2%80%A6N%20suffix%2C%20are%20stable%20releases.">would be interpreted by d.o as a <em>stable</em> release</a>, and exposed via d.o's Composer facade as such. </li></ul> <h3 id="proposed-resolution">Proposed resolution</h3> <h4>Tag naming scheme</h4> <p>Discussed with @effulgentsia and @lauriii, and we decided on the following versioning scheme for XB's frequent releases:</p> <ul> <li>When tagging a release at the <strong>conclusion of a sprint</strong>: <strong>raising the pre-hyphen number</strong> (patch or minor depending on whether there's a new feature to highlight) </li><li>Otherwise: <strong>raise the <code>alphaN</code> number</strong> </li></ul> <h4>Tag creation</h4> <ol> <li>first push a commit to create the tag, with: <ul> <li>message: tag name, e.g. <code>0.2.0-alpha1</code> </li><li>changes: the result of <code>npm run build </code> </li><li>this is similar to Drupal core&rsquo;s <a href="https://git.drupalcode.org/project/drupal/-/commit/b33c9280991c437a3fa05dec941c54bca0ddb7d8">https://git.drupalcode.org/project/drupal/-/commit/b33c9280991c437a3fa05dec941c54bca0ddb7d8</a> </li></ul> </li> <li>then push a commit that reverts that: <ul> <li>message: <code>Back to dev</code> </li><li>changes: revert <code>npm run build</code> </li><li>this is similar to Drupal core&rsquo;s <a href="https://git.drupalcode.org/project/drupal/-/commit/f30549fbdd5ebfb2b338c3bbcfda36ac0bf1ca9d">https://git.drupalcode.org/project/drupal/-/commit/f30549fbdd5ebfb2b338c3bbcfda36ac0bf1ca9d</a> </li></ul> </li> </ol> <p><strong>Automate those 2 steps using a script, because this is error-prone.</strong></p> <h3 id="ui-changes">User interface changes</h3> <p>None.</p> > Related issue: [Issue #3455753](https://www.drupal.org/node/3455753) > Related issue: [Issue #3509451](https://www.drupal.org/node/3509451)
issue