Remus Rusanu
Remus Rusanu

Reputation: 294407

Increment GitVersion per build

Talking about UseGitVersion@5 Azure DevOps task, which is a wrapper around the actual GitVersion tool. I looked at the various GitVersion configuration options, but I could not find anything that will increment per build. Not per commit, per build. I have a build counter value I can pass to GitVersion, if it would be willing to accept it somehow, but I don't see any argument or option to use it.

The only option I found so far is to override the next-version value in GitVersion.yml, but I would prefer to increment the PreReleaseTag rather than the semver.

Upvotes: 0

Views: 916

Answers (1)

Asbjørn Ulsberg
Asbjørn Ulsberg

Reputation: 8820

You can include environment variables in the various *-format properties in GitVersion.yml through the {env:ENVIRONMENT_VARIABLE} syntax.

Upvotes: 2

Related Questions