Search code examples
azure-devopsgit-branchsemantic-versioning

VSTS build number for build definition


I have a few branches in my git repo e.g. master for production, dev for development, qa for testing, etc.

Each branch has it's own build definition, like app-dev, app-qa, app-prod, etc.

I'd like to include build number as a part of artifact name, e.g. 0.3.0-SNAPSHOT.53 for development or 0.2.0-RC.12 for testing.

Obviously each build definition's number should be unique.

Is it possible?


Solution

  • Use the $(Rev:.r) Token documented here: Build number format.