AArnott / Library.Template

A template for a NuGet package with tests, stylecop, fxcop, versioning, and Azure Pipelines build ready to go.
MIT License
131 stars 26 forks source link

publish-deployables.yml needs windows path delimiters #150

Closed SteveBush closed 2 years ago

SteveBush commented 2 years ago

Publish-deployables.yml runs in a Windows build host. dotnet nuget push fails to find the deployables-Windows folder due to forward slashes in the path.

script: dotnet nuget push $(Pipeline.Workspace)/deployables-Windows/*.nupkg -s $(ci_feed) -k azdo --skip-duplicate

Fix is to use Windows backslash delimters:

script: dotnet nuget push $(Pipeline.Workspace)\deployables-Windows\*.nupkg -s $(ci_feed) -k azdo --skip-duplicate

AArnott commented 2 years ago

Nice catch.

AArnott commented 2 years ago

The trick is that some pipelines (based on this template) run this step on linux agents, which is in fact how I made this error in the first place. A backslash would be misinterpreted on linux, so I'll fix using a pwsh cmdlet that will normalize on the right slash.

SteveBush commented 2 years ago

Makes sense. I changed to a Windows build host when the template changed the default to use a Windows build host.