1

Command line

echo ##teamcity[setParameter name='test' value='0.%build.number%']
echo %test%

Log

[Step 1/1] ##teamcity[setParameter name='test' value='0.10']
[Step 1/1] 0

What is wrong?

Abedron
  • 744
  • 1
  • 6
  • 20

1 Answers1

2

All parameter references resolved before executing script, so if test has value 0 before writing script into file, script content would be

echo ##teamcity[setParameter name='test' value='0.10']
echo 0

Proper solution would be store 0.%build.number% in some variable and use it, e.g.

_test="0.%build.number%"
echo "##teamcity[setParameter name='test' value='0.$_test']"
echo $_test
Vlad
  • 686
  • 5
  • 13