When can I use which variable substitution

James Murphy's Avatar

James Murphy

05 Jun, 2014 08:22 AM

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.

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.

As a specific example, it would be nice to use say build or version in number artifact names when zipping an entire folder.

  1. Support Staff 1 Posted by Feodor Fitsner on 05 Jun, 2014 05:16 PM

    Feodor Fitsner's Avatar

    Yes, you can use $(environment-variable-name) 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: http://www.appveyor.com/docs/environment-variables

    Let me know if you have any questions.

  2. 2 Posted by James Murphy on 06 Jun, 2014 11:32 AM

    James Murphy's Avatar

    Thanks for addressing the specific, unfortunately that doesn't quite work (I can guess why):

    If I put:

      - path: publish
        name: appveyor.$(APPVEYOR_VERSION_NUMBER)

    In my .yml I get an artefact called AppVeyor..zip which is not quite what I had in mind!

    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}

  3. Support Staff 3 Posted by Feodor Fitsner on 06 Jun, 2014 05:00 PM

    Feodor Fitsner's Avatar

    I see. I will check why environment variable is not evaluated in artifact "name".

    Those ones in curly braces - there are only two of them {build} and {version} 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.

  4. James Murphy closed this discussion on 06 Oct, 2014 12:18 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac