marcocesarato / php-conventional-changelog

A PHP tool built to generate a changelog from a project's commit messages and metadata following the conventionalcommits.org and automate versioning with semver.org.
GNU General Public License v3.0
230 stars 32 forks source link

fix: extra release generation #46

Closed jeremycab closed 2 years ago

jeremycab commented 2 years ago

Description

This PR aims to fix the "extra release" tag generation (=> alpha, beta, rc).

Extra release tag generation is supposed to work as follow:

  1. fetch the last release tag created
  2. check if an extra release tag was created for this tag
  3. if an extra release tag was created, increment it. If not, create it.

Examples:

RC tag creation when one already exists

  1. Last release tag: v1.1.0
  2. Last release candidate tag: v1.1.1-rc.1
  3. New release candidate tag: v1.1.1-rc.2

RC tag creation when none already exists

  1. Last release tag: v1.1.0
  2. Last release candidate tag: null
  3. New release candidate tag: v1.1.1-rc.1