Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Get Revision Number
Get Revision Number

Get Revision Number

Shayki Abramczyk

|
360 installs
| (2) | Free
Get the build revision number ($(Rev:.r) and set it as a variable - $(Revision) for the next steps
Get it free
Build Release
Build Status Release Status

Get Revision Number

Get the build revision number and set it as a variable - $(Revision) for the next tasks.

For example, if the build number is 3.6.1, you will get a variable with the value 1.

The build number should contains $(Rev:.r) in the end of the number, for example: $(Date:yyyyMMdd)$(Rev:.r).

By default the variable name will be $(Revision) but you can determine the name in the task.

Usage

In the classic editor:

Task

  • Variable Name: The variable name of the revision number for use in the next tasks, by default is Revision, you can use it in inline tasks - $(Revision).

In yaml piepline:

- task: GetRevision@1
  displayName: 'Get Revision'
  inputs:
    VariableName: Revision

Knowen Issues

  • None.

Release Notes

New in 1.0.0

  • First version.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft