Why TeamCity displays a build number specified by a pattern with slashes and single quotes.

Answered

Hi,

I added the step which changes the build number. It's bash script:

scriptContent = """
#!/bin/bash -xe
echo "##teamcity[buildNumber '$appVersion']"
""".trimIndent()

And when the build finished the build number was: 

#\''1.1.0.0-rc-56f36ac'\' at 2 Apr 16:02

I'm very curious: Why did a server add extra slashes and quotes?

What Can I do to get good displaying without extra quotes and slashes?

I'm using teamcity version 2019.2.

Thanks)

0
2 comments

Hello,

I believe this happens because you start bash with the '-x' option, which enables verbose output. Try removing it.

The service message is printed out twice because of enabled debug: the regular output and the debug that illustrates what was executed. TeamCity catches both service messages. Messages are processed asynchronously. This means that the debug message may be the last one to be processed, hence the result.

1
Avatar
Permanently deleted user

Thanks a lot)

0

Please sign in to leave a comment.