Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In which branch should a beta release be tagged?

In which branch should a beta release be tagged according to git-flow?

We have a release branch for preparing Version x.0.0, but before releasing x.0.0 we want to release a beta (x.0.0-beta). Should the release branch be merged into master in this case and then be tagged x.0.0-beta on master or should this beta release be tagged on the release branch for x.0.0?

Additional question: Is the procedure for a release candidate (x.0.0-rc1) the same as for beta?

like image 945
white_gecko Avatar asked Sep 05 '16 09:09

white_gecko


People also ask

How do you name a release branch?

The release branch derives from the develop branch and merges back into the develop and main branches after completion of a release. By convention, the naming of this branch starts with release/* . This branch is created and used when features are completed and finalized for a versioned release.

What is branch tagging?

A tag represents a version of a particular branch at a moment in time. A branch represents a separate thread of development that may run concurrently with other development efforts on the same code base. Changes to a branch may eventually be merged back into another branch to unify them.

What is the master branch and release branch for?

Master is a permanent branch which always reflects a production-ready state. So yes, it is for ready-product which can be downloaded on the market by user. Release is a temporal supporting branch to support preparation of a new production release.

What is beta branch in git?

The beta branch is where bug fixes and only bug fixes are committed.


2 Answers

I would suggest that you would place the x.0.0-beta tag on the release branch, once you are ready to ship the beta version, somewhere. You might actually want to go further and tag it with x.0.0-beta0001 so that you can have multiple beta version, as required.

Once you move closer to the release, you would tag the release branch with the x.0.0-rc1 as required as well.

Then, once you merge the release branch into master, and ultimately back into develop, you would tag the master branch with the final version number.

This approach was taken from the implementation of git-flow in the GitVersion utility, which is documented here:

https://gitversion.net/docs/learn/branching-strategies/gitflow/examples

like image 180
Gary Ewan Park Avatar answered Sep 19 '22 14:09

Gary Ewan Park


In my understanding all versions should be merged to and tagged on the master branch. As all Release branches should follow this flow. Semantic versioning should prevent people from updating to the released alpha/beta/RC versions.

This keeps your flow clean and straight forward. I.E. No branches are left open to clean up at a later date. And you always finish release branches in the same way after you've upped version number and tested your code.

Optional

You could remove all preliminary tags for a specific version after the real release. Yet again this is to keep your flow clean. As people are probably not going to checkout 'unstable' versions of a full and stable release.

1.2.0-alpha
1.1.0
1.1.0-rc2
1.1.0-rc1
1.0.0
1.0.0-beta1
1.0.0-alpha1

Would become

1.2.0-alpha
1.1.0
1.0.0
like image 27
Maarten Bicknese Avatar answered Sep 20 '22 14:09

Maarten Bicknese