Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Add branch name to build number
Add branch name to build number

Add branch name to build number

Ardour Digital Limited

|
98 installs
| (0) | Free
Build task for appending the branch name to the build number when the build is not using the master branch. E.G. '1.0.0.1' being built from the 'develop' branch would become '1.0.0.1-develop'.
Get it free

Track where your builds have come from

If you are building from multiple branches it can be hard to tell which branch a build has come from when only looking at a list of releases (e.g. when selecting which builds to use in a release).

This build task will update the version number to include the name of the branch when the build is not from master.

If your normal version number format is 1.2.3.4, and you build from the master branch, then your build number will stay the same.

If you build off another branch e.g. develop or features/my-cool-feature your version number will be updated to be 1.2.3.4-develop or 1.2.3.4-my-cool-feature respectively.

The task can be used in a YAML build by including this step:

- task: AddBranchToBuildNumber@1
  displayName: Add branch to the build number
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft