tag:help.appveyor.com,2012-11-13:/discussions/questions/315-when-can-i-use-which-variable-substitutionAppVeyor: Discussion 2014-10-06T12:18:29Ztag:help.appveyor.com,2012-11-13:Comment/332825472014-06-05T08:22:23Z2014-06-05T08:22:24ZWhen can I use which variable substitution<div><p>I'm struggling a bit with this - perhaps I'm not finding the
right place in the docs - but could we have a simple guide to what
variable substitution works when.</p>
<p>My particular interest is in what works in the .yml - but
generically it would be helpful to have a list of variables and the
contexts in which they can be used.</p>
<p>As a specific example, it would be nice to use say build or
version in number artifact names when zipping an entire folder.</p></div>James Murphytag:help.appveyor.com,2012-11-13:Comment/332825472014-06-05T17:16:02Z2014-06-05T17:16:02ZWhen can I use which variable substitution<div><p>Yes, you can use <code>$(environment-variable-name)</code> in
"Deployment name" of artifact definition that will be used as a zip
file name if specified. The list of AV environment variables is
here: <a href=
"http://www.appveyor.com/docs/environment-variables">http://www.appveyor.com/docs/environment-variables</a></p>
<p>Let me know if you have any questions.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/332825472014-06-06T11:32:23Z2014-06-06T11:32:23ZWhen can I use which variable substitution<div><p>Thanks for addressing the specific, unfortunately that doesn't
quite work (I can guess why):</p>
<p>If I put:</p>
<pre>
<code>artifacts:
- path: publish
name: appveyor.$(APPVEYOR_VERSION_NUMBER)</code>
</pre>
<p>In my .yml I get an artefact called <code>AppVeyor..zip</code>
which is not quite what I had in mind!</p>
<p>To get the answer to the question I actually asked... it would
be nice to have a table that showed the same list as you have for
environment variables that also includes the one valid for
substitution with {valuename} and then a list of places where we
can use {valuename}</p></div>James Murphytag:help.appveyor.com,2012-11-13:Comment/332825472014-06-06T17:00:51Z2014-06-06T17:00:51ZWhen can I use which variable substitution<div><p>I see. I will check why environment variable is not evaluated in
artifact "name".</p>
<p>Those ones in curly braces - there are only two of them
<code>{build}</code> and <code>{version}</code> and they work in
assembly patching and "version" sections only. These variables have
been in AV from day one and left for backward compatibility. Sorry
for that confusion.</p></div>Feodor Fitsner