Closed StefH closed 5 years ago
I'm not familiar with writing dotnet tools. But I'm guessing it would require quite the rewrite of the application to work as expected, which unfortunately I doubt I would have the time for anytime soon. Nor am I familiar with azure pipelines for that matter.
I'm not against the idea though.
I think it's very easy to convert codecov into a dotnet tool, only things needed are small updates in the .csproj
file.
Example:
<PackAsTool>true</PackAsTool>
And then upload as NuGet. (Maybe you need another name because codecov is already there)
See this page: https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-create Azure Pipelines was just an example.
That may be the only change if we were to only provide the dotnet tool, but doing that would also break pretty much every project using codecov-exe already.
I have a few ideas to test out, but unfortunately isn't really in a position to do that right now.
An easy work-around is to wrap that extra setting in an IF condition which checks for an environment variable.
Example where this xml is only used when the buildType environment variable is set to "DOTNET_TOOL".
<PropertyGroup Condition=" '$(buildType)' == 'DOTNET_TOOL' ">
<PackAsTool>true</PackAsTool>
</PropertyGroup>
@StefH this is one of the paths I was considering to test out.
The Codecov.Tool package was just pushed to nuget, it is still indexing so give it some time until it can be used.
Thank you @ViktorHofer for providing the project file to make this available.
Thanks for providing the tool! 👍
Can you make a dotnet global tool from codecov ?
So that it can be easily used in e.g. Azure Pipelines? Like
or
See also this list from all supported tools until now: https://github.com/natemcmaster/dotnet-tools