Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate & display the supported Cake versions for extensions #1288

Conversation

augustoproiete
Copy link
Member

image

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)

  1. Read the TargetCakeVersion populated by the AddinDiscoverer, which is derived from the version of Cake.Core or Cake.Common that an add-in targets

  2. Determine 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)

  3. Determine the highest compatibility range that the add-in falls into based on a lookup table of version ranges derived from the LatestPotentialBreakingChange

  4. 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

  1. (Same as step 1 above)

  2. (Same as step 2 above)

  3. 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 Cake 1.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:

Sample Package TargetCakeVersion SupportedCakeVersions
Cake.MinVer (*) 1.0.0-rc0001 ➡️ 1.0.0-rc0001
Cake.ArgumentBinder 0.38.5 ➡️ 0.38.5
Cake.WinSCP 0.38.4 ➡️ 0.38.4 - 0.38.5
Cake.CoverageComparer 0.38.2 ➡️ 0.38.2 - 0.38.5
Cake.NScan 0.38.1 ➡️ 0.38.1 - 0.38.5
Cake.ApiReference.Uploader 0.37.0 ➡️ 0.37.0 - 0.38.5
Cake.Coverlet 0.36.0 ➡️ 0.36.0 - 0.38.5
Cake.Azure 0.35.0 ➡️ 0.35.0 - 0.38.5
Cake.Board.Asana 0.34.1 ➡️ 0.34.1 - 0.38.5
Cake.Fastlane 0.34.0 ➡️ 0.34.0 - 0.38.5
Cake.7zip 0.33.0 ➡️ 0.33.0 - 0.38.5
Cake.XmlDoc.Checker 0.32.1 ➡️ 0.32.1
Cake.Debootstrap 0.30.0 ➡️ 0.30.0 - 0.32.1
Cake.MiniCover 0.29.0 ➡️ 0.29.0 - 0.32.1
Cake.ArgumentHelpers 0.28.1 ➡️ 0.28.1 - 0.32.1
Cake.GitPackager 0.28.0 ➡️ 0.28.0 - 0.32.1
Cake.DependenciesAnalyser 0.27.1 ➡️ 0.27.1 - 0.27.2
Cake.AssemblyInfoReflector 0.26.1 ➡️ 0.26.1 - 0.27.2
Cake.DocumentDb 0.26.0 ➡️ 0.26.0 - 0.27.2
Cake.HandlebarsDotNet 0.25.0 ➡️ 0.25.0
Cake.AWS.ElasticBeanstalk 0.23.0 ➡️ 0.23.0 - 0.25.0
Cake.DependencyCheck 0.22.0 ➡️ 0.22.0 - 0.25.0
Cake.RSync 0.21.1 ➡️ 0.21.1
Cake.ClickTwice 0.19.5 ➡️ 0.19.5 - 0.21.1
Cake.DocCreator 0.19.4 ➡️ 0.19.4 - 0.21.1
Cake.AutoRest 0.18.0 ➡️ 0.18.0 - 0.21.1
Cake.ActiveDirectory 0.17.0 ➡️ 0.17.0 - 0.21.1
Cake.Gradle 0.15.2 ➡️ 0.15.2
Cake.SimpleHTTPServer 0.13.0 ➡️ 0.13.0
Cake.ViewCompiler 0.10.1 ➡️ 0.10.1
Cake.CakeBoss 0.6.4 ➡️ 0.6.4
MagicChunks 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 for TargetCakeVersion 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


Copy link
Member

@pascalberger pascalberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pascalberger pascalberger merged commit a868fa7 into cake-build:master Dec 2, 2020
@pascalberger
Copy link
Member

@augustoproiete your changes have been merged, thanks for your contribution 👍

@pascalberger pascalberger deleted the calc-supported-cake-versions-for-extensions branch December 2, 2020 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Figure out which version of Cake Addin's are targeting
2 participants