I have an appveyor.yml
definition which contains the fragment
init:
- ps: $Env:LABEL = If ($Env:APPVEYOR_REPO_TAG) { "Tag" + $Env:APPVEYOR_REPO_TAG_NAME } else { "nontaglabel" }
When later trying to access %LABEL%
, on non-tag commits it contains the plain string "Tag". I expected it to contain the string "nontaglabel".
On tag commits, it contains the expected string Tag with the tag name as a suffix.
How can I assign the environment variable "nontaglabel" to the environment variable on commits that aren't tags?