For teamcity. The output of code below, passcount is '0' but it should be 4 based on I know it is doing 4 passes. command line script (abbreviated):
result=0
passcount=0
for layer in %project.layers%; do
// some stuff...
result=$?
if [[ "$result" -ne 0 ]]; then
break;
else
passcount++
echo " $layer Succeeded"
fi
done
Take passcount++ into double brackets, i.e. ((passcount++))