Let's assume we have variable: VERSION=4 (which is in fact next build number in this example)
In next build label field we are using option "Use specified version" which is "${vars.get("VERSION").increase()}"
Now we have a step which is using value from VERSION variable. Because VERSION variable is modified in creation of the next build label, the step receives VERSION as 5 which is wrong. It should be 4 till end of build.
As workaround I can move increase to PostBuild script section but this is double work since the NBL field can be evaluated at the end of build call.
Description
Let's assume we have variable: VERSION=4 (which is in fact next build number in this example)
In next build label field we are using option "Use specified version" which is "${vars.get("VERSION").increase()}"
Now we have a step which is using value from VERSION variable. Because VERSION variable is modified in creation of the next build label, the step receives VERSION as 5 which is wrong. It should be 4 till end of build.
As workaround I can move increase to PostBuild script section but this is double work since the NBL field can be evaluated at the end of build call.