Build number format invalid character in the branch name

I am using %teamcity.build.branch% and it has a character '/' in the branch name, I would like to substitute this with '_', how do I do that?

The reason I need to do this is because I am using %build.number% in the artifact filename and '/' is an invalid character.

 

0
1 comment

Hi, I'm assuming that you are missing in the first sentence that you are using the branch as the build number.

If this is the case, we don't have automated ways of doing that. There is a couple options:
-Add a last build step that renames the artifact, then set an extra parameter with the end name result that can be picked by the artifact path
-Add an initial build step or build configuration that sets the build number for the whole build or bulid chain. This is commonly the case, as it's more flexible do run it also for multiple build configurations in a build chain.

0

Please sign in to leave a comment.