Calculate & display the supported Cake versions for extensions #1288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per discussion on #299 this is how I'm calculating the supported versions of a Cake add-in in this PR:
Add-ins targeting stable versions of Cake (i.e. not pre-release)
Read the
TargetCakeVersion
populated by the AddinDiscoverer, which is derived from the version ofCake.Core
orCake.Common
that an add-in targetsDetermine the minimum Cake compatible version by mapping the
TargetCakeVersion
to a corresponding version of the Cake package to one of the listed versions of the Cake package (edge case if a version of Cake is unlisted, or if core libraries are released separately from the Cake package)Determine the highest compatibility range that the add-in falls into based on a lookup table of version ranges derived from the
LatestPotentialBreakingChange
Determine the maximum Cake compatible version from the highest listed Cake version that satisfies the highest compatibility range the add-in falls into
Add-ins targeting pre-release versions of Cake
(Same as step 1 above)
(Same as step 2 above)
Assume that the add-in is only compatible with the specific minimum version of Cake (pre-release) determined on step 2. e.g. an add-in targeting Cake
1.0.0-rc0001
will show on the website as compatible only with Cake1.0.0-rc0001
(pinned). This is what made sense to me, but happy to change if it's too conservative.I sampled one add-in of each version that is currently tracked, and here are the supported Cake versions assigned to each one:
null
NB: When unable to determine the supported Cake versions it won't display the "Supported Cake versions" item on the website.
MagicChunks
is an example of an extension that doesn't have a value assigned forTargetCakeVersion
at the moment (will be fixed by #1287).(*) The AddinDiscoverer doesn't yet support pre-release versions when populating the
TargetCakeVersion
and will be fixed soon. More details on #1285