Difference between $(Rev:r) and $(Rev:.r) in BuildNumber part of Azure DevOps Build Pipelines?

85 views Asked by At

Was going through this doc Configure run or build numbers and found usage of both $(Rev:r) and $(Rev:.r) but no definition .r one.

Do anyone know difference between the two ?

Also checked a community issue Description of $(Rev:r) lacks meaning of $(Rev:.r) and its used on this page in most of examples raised regarding same, but did not find anysolution there too.

1

There are 1 answers

0
Bright Ran-MSFT On BEST ANSWER

The difference is just having or not having an extra dot (.) character to the build number.

For example:

  • If setting the build number the as $(Date:yyyyMMdd)$(Rev:.r), the result will look like 20231017.1.
  • If setting the build number the as $(Date:yyyyMMdd)$(Rev:r), the result will look like 202310171.