I had created auto deployment steps using TFS vNext
build system.
In one step I needs to access $(Date:yyyyMMdd)
for some file versioning stuff.
Below you can find configuration and error snippet:
So any idea how to access date related variables as argument in PowerShell script step ?
"$(Date:yyyyMMdd)" is a token for Build number format, not a variable. So you cannot use it in the build steps.
The alternative way to do this is to set the "Build number format" under "General" tab to "$(Date:yyyyMMdd)", the variable "$(Build.BuildNumber)" will be filled with the value of "$(Date:yyyyMMdd)". And then you can use "$(Build.BuildNumber)" variable in the build steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With