Skip to content

Create stable branch only for active version

Reuben Pereira requested to merge rp/safely-create-stable-branch into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Content

  • Create stable branch only for active version

When tagging a new version, release-tools creates the stable branch from master if it doesn't already exist. This can cause problems if a stable branch for an older version doesn't exist, since release-tools will quietly create a stable branch from master, which is not what we want.

In this MR, we only create the stable branch automatically if the version that we're creating for is the "active version". If the version is not the active version, it raises an error.

This will help prevent situations like gitlab#458462 (closed) from happening.

Some classes that include PublicRelease::Release will have overridden the create_target_branch method. This shouldn't be a big problem since the situation that we're trying to avoid is much more likely to occur for projects that are newly added to managed versioning.

Author Check-list

  • Has documentation been updated?

Merge request reports