Unable to select a single file based on wildcard

Brian Ball's Avatar

Brian Ball

30 May, 2014 06:40 PM

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

  1. Support Staff 1 Posted by Feodor Fitsner on 30 May, 2014 06:47 PM

    Feodor Fitsner's Avatar

    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-artifact

  2. 2 Posted by Brian Ball on 30 May, 2014 07:38 PM

    Brian Ball's Avatar

    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. 3 Posted by Brian Ball on 30 May, 2014 07:48 PM

    Brian Ball's Avatar

    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 read I can't use the environment variable because the version in the file name won't always match the build number.

  4. Support Staff 4 Posted by Feodor Fitsner on 30 May, 2014 07:59 PM

    Feodor Fitsner's Avatar

    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 with Args.*.nupkg - can't exclude there is a bug.

    For now you can use the following PowerShell snippet to push NuGet packages to artifacts:

    Get-ChildItem .\Args.*.nupkg | % { Push-AppveyorArtifact $_ -FileName $_.FullName }
    

    if you use appveyor.yml put it, for instance, in after_build` section:

    after_build
      - ps: Get-ChildItem .\Args.*.nupkg | % { Push-AppveyorArtifact $_ -FileName $_.FullName }
    

    otherwise on project settings UI in appropriate place.

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:44 AM.

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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM