tag:help.appveyor.com,2012-11-13:/discussions/questions/3643-how-to-set-the-configuration-based-on-the-branch-andor-tagAppVeyor: Discussion 2018-10-19T08:18:18Ztag:help.appveyor.com,2012-11-13:Comment/423545792017-04-13T22:46:38Z2017-04-13T22:46:38ZHow to set the Configuration based on the BRANCH and/or TAG?<div><p>You can do that, but potential problem is that it can be reset to what you have in build configuration. So you need to ensure that you do not set configuration in YAML on on the Build tab if you use UI.</p>
<p>Script on PowerShell can look like this: <code>IF ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq "true") {$env:CONFIGURATION = "Release"} else {$env:CONFIGURATION = "Debug"}</code></p>
<p>Ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/423545792017-04-14T00:09:34Z2017-04-14T00:09:34ZHow to set the Configuration based on the BRANCH and/or TAG?<div><p>OK - i'll go with the powershell solution because I've already got that in my <code>init</code> section for determining where to nuget deploy / webdeploy. (i.e. not-tag == myget and with-a-tag == nuget.org)</p></div>Pure Krome