You can overwrite the parameter value using a simple script that issues a "set parameter" service message .
Using a special service message in your build script, you can dynamically update the build parameters to the right of the build phase (...)
With this approach, do the following:
In the first assembly configuration, define a custom assembly parameter and set its value for the unique number that you generate. Do this directly from a script that generates a unique number by writing something like this to STDOUT:
##teamcity[setParameter name='magicNumber' value='1234']
In the dependent assembly configuration, you now have access to this parameter. Using the second build of the script, you can overwrite teamcity.build.branch using the same mechanism:
#
Note 1: I recommend that you do not overwrite the built-in parameters, because this can have strange side effects. Rather, define a custom parameter in the second assembly configuration and use it for visualization purposes.
Note 2: If you decide to ignore Note 1, you may need to overwrite the assembly parameters by setting the dependency property as described in the documents in the section "Overriding Dependency Properties":
#
source share