xoofx / dotnet-releaser

Easily build, run tests and coverage, cross-compile, package and publish your .NET library or application to NuGet and GitHub.
BSD 2-Clause "Simplified" License
681 stars 24 forks source link

[Bug] Having testing enabled with coverage off causes exception #38

Closed benjiro closed 2 years ago

benjiro commented 2 years ago

When coverage is disabled the process will fail because it expects the coverage folder to exist in the artifacts output.

Unexpected error Could not find a part of the path 'REPO\artifacts-dotnet-releaser\coverage'.

This line should check if coverage is enabled before assuming https://github.com/xoofx/dotnet-releaser/blob/main/src/dotnet-releaser/ReleaserApp.BuildAndTests.cs#L82

Config that causes the problem

# configuration file for dotnet-releaser
[msbuild]
project = "OpenFeature.SDK.sln"
configuration = "Release"
[github]
user = "open-feature"
repo = "dotnet-sdk"
version_prefix = "v"
[coverage]
enable = false
[coveralls]
publish = false
[brew]
publish = false
[service]
publish = false
xoofx commented 2 years ago

Thanks, good catch!