Unable to select a single file based on wildcard
I have post build script that generates a NuGet package (my package consist of assemblies from multiple projects in the solution). I want to include that nuget packge in the artifacts.
The generated package is in the root directory of the code. It
looks like this: Args.1.1.1.nupkg. Over time, the version number
will change (based on changes I make to the .nuspect file). I'd
rather not have to change my settings for the project each time I
update this value. I've tried to use wildcards, but I haven't
gotten the outcome I want:
"Args.*.nupkg": This gives me the file I want, but also includes
other files that are similarly named in a subdirectory
"\Args.*.nupkg": This results in no files being selected
".\Args.*.nupkg": Same as the previous line, this results in no
files being selected.
Is this a bug, or am I not getting the syntax correct?
Thanks,
Brian
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
Support Staff 1 Posted by Feodor Fitsner on 30 May, 2014 06:47 PM
Hi Brian,
You can use environment variables substitution in artifact path, for example
Args.$(appveyor_build_version).nupkg
.As a side note - to target file in specific directory try specifying full path to it, e.g.
bin\release\*.dll
.And last but not list you can use
appveyor.exe
command line to push artifacts: http://www.appveyor.com/docs/build-agent-api#push-artifact2 Posted by Brian Ball on 30 May, 2014 07:38 PM
Thanks for the quick response!
I can't use the environment variable as the version in the file won't always match up with the nuget package version.
The directory is at the root of my repo, so I can't specify a folder. I tried
C:\projects\args\Args.*.nupgk
, but I got an error saying I had illegal characters.Does the
appveyor.exe
support wildcard characters?3 Posted by Brian Ball on 30 May, 2014 07:48 PM
The following line
I can't use the environment variable as the version in the file won't always match up with the nuget package version.
should readI can't use the environment variable because the version in the file name won't always match the build number.
Support Staff 4 Posted by Feodor Fitsner on 30 May, 2014 07:59 PM
It's
:
not allowed, only relative paths are accepted.So,
Args.1.1.1.nupkg
is in the root of build folder. I will make sure AppVeyor wildcard allows to grab it withArgs.*.nupkg
- can't exclude there is a bug.For now you can use the following PowerShell snippet to push NuGet packages to artifacts:
if you use
appveyor.yml
put it, for instance, in after_build` section:otherwise on project settings UI in appropriate place.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:44 AM.