Solved: Lowercase var Using TeamCity Mac Build Agent Command Line Step

June 4, 2018


I had a heck of a time figuring this out, so I’m blogging it :)

branch=`echo ""| tr '[:upper:]' '[:lower:]'`

(Note the back ticks around the entire value – they’re important =)

While I”m here, I’ll also blog how to set a TC param from within the same script & use a case statement with default fallthrough :)

case $branch in 
    echo "Stable Version"
    echo "##teamcity[setParameter name='MyTeamCityParam' value='stable']"
    echo "Alpha Version"
    echo "##teamcity[setParameter name='MyTeamCityParam' value='alpha']"

(The 1st echo statements in the case statements are just for TC build log metadata for me)

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: