Skip to content

How do I use gitVersion to auto increment per commit and not use a pre-release tag for master #889

@ashtonian

Description

@ashtonian

I'm trying to use gitversion for internal nuget packages that are just utility classes. Essentially if a PR gets merged then the package should be released and I don't want to deal with tagging. I'd like the build server to just iterate the patch number automatically without a pre-release tag otherwise nuget will act weird with update in visual studio. I've try the following settings expecting it to work and it removed the last number as that is the pre-release but I'm not sure how I can get it to auto increment the patch as a result.

assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: ''
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
commit-message-incrementing: Enabled
branches:
  master:
    mode: ContinuousDeployment
    tag: ''
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false

breaking changes don't happen that often and would be manually tagging with a major version increment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions