How do I embed the build version in an artifact name?
I'm attempted to embed the build version in my artifiact name. I'm using the following as the QDeployment Name" but it doesn't seem to be available:
75 Uploading artifact
CIVersionTest\bin\CIVersionTest-$(appveyor_build_version).zip (3.3
KB)...Done
76 appveyor_build_version : The term 'appveyor_build_version' is
not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was
included, verify that the path is
77 correct and try again.
78 At line:2 char:29
79 + $artifacts["CIVersionTest-$(appveyor_build_version)"] = @{
name = 'CIVersionTest ...
80 + ~~~~~~~~~~~~~~~~~~~~~~
81 + CategoryInfo : ObjectNotFound: (appveyor_build_version:String)
[], CommandNotFoundException
82 + FullyQualifiedErrorId : CommandNotFoundException
Is there a way I can accomplish this? I'm attempting to get a zip file named similar to "CIVersionTest-v1.0.0.8.zip".
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | 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

1 Posted by jcw on 10 Mar, 2014 07:59 AM
I should also mention that I tried the following for "Deployment Name":
But that results in the following error:
2 Posted by tony on 10 Mar, 2014 12:24 PM
Try $("CIVersionTest-"+$env:APPVEYOR_BUILD_VERSION) ?
Support Staff 3 Posted by Feodor Fitsner on 10 Mar, 2014 05:47 PM
Deployment name is like an "artifact label" used to locate artifact during deployment. To change artifact file name in a cloud storage the only way is to use push artifact command: http://www.appveyor.com/docs/build-agent-api#push-artifact, for example:
4 Posted by jcw on 10 Mar, 2014 11:55 PM
Ah, ok. Well I removed my artifact creation from the UI and am doing it solely through the API now. In case anyone else wants to do the same, I put the following script into Deployment -> "Before deployment script" and now I get an artifact named "CIVersionTest-v1.0.0.19.zip":
Support Staff 5 Posted by Feodor Fitsner on 10 Mar, 2014 11:59 PM
Fantastic, thanks for sharing this!
Especially nice is
ZipFilesfunction - it demonstrates that .NET 4.5 assemblies can be easily called from PS ;)Btw, there is
7zon build servers, so that might be an option too...Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:37 AM.