We have moved to a product versioning approach which will mark/increment builds according to the following format: [Major].[Minor].[Build].[Revision/Patch]
, and a production release will essentially be an increment of Major or Minor (depending on the scope of changes).
This works great for patches and Trunk builds, but not so well for concurrent feature development in branches - especially as it is likely we would build release candidates off the branch instead of merging to the Trunk and releasing (not my preferred option, but likely to be more realistic, unfortunately).
Regardless of whether we merge down to the trunk (or not), does anyone have any useful strategies for dealing with branch versioning? We'd need to be able to uniquely identify builds from the branches and trunk, and may end up releasing from trunk or branches at any given time.
Some considerations:
A (lightweight) scenario may help:
Product X\Trunk (ver 1.1.208.0)
Product X\Branches\Feature A (ver 1.1.239.0)
Product X\Branches\Feature B (ver 1.1.221.0)
Edit: The best documentation I've found thus far is located on MSDN though it is a little vague on unique versioning of concurrent branches.
But to effectively manage projects with multiple developers and releases, you need a branching strategy. This organizes your branches and development resources, allowing you to release on time. No matter your experience, this version control branching guide will walk you through everything you need to know.
In this strategy, each version is a git branch. Each code commit is committed to a single version. and versions are marked using git tag (or Github releases) on the relevant branch. Practically, if a developer wants to introduce a new v2.0.0 version, and the current git master points on the last commit of the previous v1 version.
Branch versioning is designed to make your multi-user editing workflows simpler and more robust. The capabilities introduced through integration with web GIS expand our reach, making the sharing of data easier and more reliable, while helping to ground the flashy pictures of web apps and fancy visualizations in the reality of data.
The main idea behind the Git flow branching strategy is to isolate your work into different types of branches. There are five different branch types in total: The two primary branches in Git flow are main and develop.
After almost two weeks of thought, conversations and feedback both from StackOverflow and from people in the industry who I consider to be experts in the field of change management, we came to a consensus approach yesterday.
There's really no right or wrong answer - no silver bullet - to correctly handling branching/merging as, IMHO, it varies from business to business and product to product. This is how we decided to go ahead:
Regardless of trunk or branch, we'll continue to number based on the format [Major].[Minor].[Build].[Rebuild] where rebuilt indicates the build revision. Branches and trunk will get out of synch (different build numbers), but that's not a problem as we'll be defining our build configurations and drop locations explicitly anyway. It'll be an environment management responsibility to know which version is deployed to which server.
We probably won't merge features into a release branch as we typically have a more release branch focus, so we'll release from a candidate branch and increment the minor version on the trunk (and other branches if applicable) before merging down to the trunk after a release has been deployed (if applicable).
Since every release elicits a minor version increment (except patches) the build numbering will never go in reverse. Patches will obviously come from a prod branch, so the build number will increase.
I've a mind to keep this thread openand let others write about their preferred technique for managing branch versioning.
We don't give version numbers to our feature branches. We have the main develop branch, then create feature branches for each feature we create. When that feature is finished, or parts of it are finished that won't break the develop branch, we merge back to develop.
In doing this, the develop branch should be somewhat stable. We release weekly so every Monday we create a release branch from develop which is given a version number. The testers then spend a day or two testing this branch to make sure it's stable, then we deploy on Tuesday/Wednesday.
As we deploy weekly we don't worry too much about fixing minor issues in the release branch. We do it in the feature branch, or if that branch is now done with directly in develop. Any major issues found we would fix in release, deploy and merge back to develop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With