ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
185 stars 28 forks source link

Indicate branch name in version schemes #135

Open ajoberstar opened 4 years ago

ajoberstar commented 4 years ago

Identify if there's a way to update the version scheme to include the branch name. The ideal would be to allow someone to get the latest version from a specific branch. This is mostly useful for PR builds.

djechelon commented 2 years ago

To expand.

This could be very useful when a team uses a branch versioning scheme to maintain earlier versions. Top OSS projects do release patches on older versions (take Spring as example, 4.3 branch should be active).

With my team, we had that very discussion about how to increment a major/minor number without manually tagging a dirty commit.

The idea is to use a branching scheme like

The pipelines can release a version out of the HEAD of any of these branches, thus the scope is always the patch. I also recommend maintainers to always merge and propagate across greater versions (e.g. 1.1 gets merged to 2.0 which cascades to 2.0, then 2.13 etc)

The idea is that Reckon should take the largest computed number among last available tag and release branch name If I release 1.1.15 and merge it to 2.0 (assuming 2.0.5 is released), I expect to work on 2.0.6.

If I open a brand new 4.0 branch out of the 3.1 branch (assuming 3.1.6 is tagged), I can choose 4.0.1 as max(from_branch_name,from_tags) (4.0.0 vs 3.1.7)

djechelon commented 2 years ago

Comment. BitBucket Server used to implement the cascade merge feature on release branches