cake-contrib / Cake.Recipe

:page_with_curl: A set of convention based Cake scripts

Home Page:https://cake-contrib.github.io/Cake.Recipe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add metadata to package with supported Cake version and TFMs

Jericho opened this issue · comments

Just like @pascalberger did in Cake.Issues.Recipe (here), we should add cake-version.yml to Cake.Recipe. This would allow AddinDiscoverer to reliably detect the supported version of Cake.

The current AddinDiscoverer logic is to parse the content of .config/dotnet-tools.json which works fine as long as the content of this file matches the content of the nuget package. However this logic breaks down when @gep13 starts working on his next release that will eventually target the next version of Cake. As soon as this file is modified and committed to the git repo, AddinDiscoverer "thinks" that Cake..Recipe has been upgraded when in fact it hasn't. The consequence is that AddinDiscoverer no longer updates the "Support Cake x.y.z" issue (such as this one).

@Jericho Should the yml only include TargetCakeVersion or should it also include TargetFrameworks?

While there is a .NET project here, that defines a TargetFramework (netstandard2.0) the dll is not shipped, so there is really nothing here that has a TargetFramework.

Can I omit TargetFrameworks, or leave it empty?

@nils-a as far as Cake.AddinDiscoverer is concerned, only TargetCakeVersion is useful. Feel free to omit TargetFrameworks.