Santosh Kumar
Santosh Kumar

Reputation: 53

Is there a way to change/update Release pipeline iteration numbers

I am trying to change the Release pipeline number with version number which is divided into like 3 parts, major,minor and build. Suppose for example Release pipeline will gets updated every time as '21', '22' ... But I want to change this by reading the numbers from that nad change it to version like "1.0.0" and which keeps incrementing for each run like major, minor, build + 1.

Highlighed as yellow from the screenshot which I am trying to change.

enter image description here

Upvotes: 0

Views: 968

Answers (1)

Leo Liu
Leo Liu

Reputation: 76910

Is there a way to change/update Release pipeline iteration numbers

The answer is yes.

You could update it from the Options tab on the release pipeline:

enter image description here

The value could be $(major).$(minor).$(rev:r). The value will be 1.0.1.

Note: You need define the major and minor in the Variables tab.

enter image description here

Yes $(major).$(minor).$(rev:r) will work definetely but I am trying to update my each Release build as Release-$(major).$(minor).$(rev:r) so that the Release build number should be like Release-1.0.1 . But same while updating it in the json file as version, I want to update only version from that, like 1.0.1 to manifest.json file.

You just need to simply deal with the variables with the command line task:

 echo $(Release.ReleaseName)

 set  TestVar=$(Release.ReleaseName)

 set MyCustomVar= %TestVar:~8,35%

 echo %MyCustomVar%

Upvotes: 2

Related Questions