as discussed here $Build.Version$ i propose to add a configuration variable:
$Configuration.VersionFormatString$
Simply providing the value of what’s there already will satisfy the request as dicussed in the above link. I will then be able to use the value in a tag repository event.
Can you give more details on how you will use this? The current Version Format String allows expressions. By default this is 1.0.0.$Build.BuildNumber$. We’re not sure how this unexpanded expression will be useful. Are you planning to expand it yourself?
Sorry, but I still don’t get why you would want to use the Version Format String rather than $Build.Version$? $Build.Version$ is just Version Format String expanded.
As written in the other post, our FinalBuilder-Script does manipulate CI’s Version by an “Set CI Version” action. For that reason the original value is no longer available.
OK, so why not just use a Set Variable action to store the build version a the start of the build. Adding an expression $Configuration.VersionFormatString$ would not work as its value would not be expanded when used.
Add a variable called OriginalBuildVersion for example. Add a Set Variable action before the FinalBuilder action, select OriginalBuildVersion for the Variable and enter $Build.Version$ as the New Value. Tick the Expand variable references in new value checkbox.
Use %OriginalBuildVersion% in your Tag Repository Changeset build event handler
That’s what i use for several configurations already. I was out for a solution that would remove the need to create and assign the variable. It’s not a big deal, but requires extra steps for each configuration that we’re using.