I have a Bash script in my build pipeline that will set some build variables depending on which branch triggered The build. However when I try to echo these variables in another bash script some of them don't echo.
Set Environment Variables:
if [[ $(Build.SourceBranchName) == 'develop' ]]; then
echo $TagVersion
echo $(Build.BuildId)
echo '##vso[task.setvariable variable=AppVersion;]$TagVersion'
echo '##vso[task.setvariable variable=ChangeSet;]$(Build.BuildId)'
echo '##vso[task.setvariable variable=Environment;]DEVTEST'
echo '##vso[task.setvariable variable=BuildConfig;]Debug'
fi
This has a output of:
v1.4.0
7090
Set Version:
echo $(AppVersion)
echo $(ChangeSet)
echo $(Environment)
echo $(BuildConfig)
This outputs
7090
DEVTEST
Debug
Why is the AppVersion now writing to the console?
$TagVersionvalue?