umbraco / OurUmbraco

MIT License
96 stars 168 forks source link

Limit packages to be lower than version 9 #817

Closed callumbwhyte closed 1 year ago

callumbwhyte commented 1 year ago

Yes yes, I know we're supposed to be using the awesome new Marketplace now...

I came back into Our for the first time in ages to update an old package. I noticed that it's possible to mark your package as supporting Umbraco 9, 10, 11, 12... but only possible to mark your package as supporting .NET 5, rather than .NET 6 or .NET 7 as required for Umbraco 10/11 respectively.

nul800sebastiaan commented 1 year ago

That checkbox list is auto-populated to run to v12, but shouldn't be :-)

I think we should cut that list off after v8 and leave messages saying packages for v9+ can be created in the new marketplace. There's no zip install of v9+ packages anyway, so it was just a way to promote your nugets. Now that marketplace is in the backoffice's packages section there's no need to keep supporting any packages for v9+.

callumbwhyte commented 1 year ago

I thought of this after... I agree. Happy to make a PR if you'll accept one!

nul800sebastiaan commented 1 year ago

Thanks! Would be great! Otherwise I'll have a look next week. I remember that version list probably has some horrible code in it, so consider yourself warned! 😅

callumbwhyte commented 1 year ago

I finally found some time to take a look at this and the change wasn't too bad...

Whilst there's a number of ways the version list is fetched in codebase, they all end up calling the UVersion class one way or another. This already had a restriction for version > 6 so felt reasonable to add another check for anything below V9 here.

This change does not impact the docs site, the releases page, or the "Compare Releases" feature.

nul800sebastiaan commented 1 year ago

Thanks @callumbwhyte - looks like it's all good, I just renamed the file in the csproj as well otherwise it wouldn't build. 😉

callumbwhyte commented 1 year ago

Doh! Thanks!