Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-magically calculate version number #228

Closed
mrbiggred opened this issue Feb 6, 2021 · 0 comments · Fixed by #237
Closed

Auto-magically calculate version number #228

mrbiggred opened this issue Feb 6, 2021 · 0 comments · Fixed by #237
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mrbiggred
Copy link
Contributor

Use GitVersion to generate the version number for this project. Actually the plan is to use the GitHub Action. GitVersion will be setup to support the Cactus Branching model (see below for details) which requires a setup like:

# GitVersion.yml
branches:
  master:
    mode: ContinuousDeployment
    tag: 'alpha'
    increment: Minor
    prevent-increment-of-merged-branch-version: false
    track-merge-target: true
  release:
    tag: 'beta'
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false

The idea is that only release-X.Y branches are tagged something like vX.Y.Z. Then this tag is merged back to main GitVersion will calculate the next version number as vX.Y+1.0.0.

When a feature branch is merged to release-X.Y for a bug fix only the patch number will be incremented and the major, minor, and patch numbers left as is.

GitVersion generates several different version number formats such as:

  • AssemblySemVer: 0.8.0.0
  • NuGetVersionV2: 0.8.0-alpha0001
  • MajorMinorPatch: 0.8.0

GitVersion can set the version in C# Assembly Version files now that they have fixed this issue.


An example of the Cactus or Trident Branching model:

Proposed CB Git Branches

@mrbiggred mrbiggred added the enhancement New feature or request label Feb 6, 2021
@mrbiggred mrbiggred self-assigned this Feb 6, 2021
@mrbiggred mrbiggred added this to the v0.6.0 milestone Feb 6, 2021
@mrbiggred mrbiggred changed the title Auto-magically determine version number Auto-magically calculate version number Feb 6, 2021
@mrbiggred mrbiggred modified the milestones: v0.6.0, v0.3.0 Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant