modmuss50 / mod-publish-plugin

A Gradle plugin to publish mods to a range of destinations
https://modmuss50.github.io/mod-publish-plugin/
MIT License
56 stars 9 forks source link

`minecraftVersionRange` throws if either the start or end is a snapshot. #33

Closed AnAwesomGuy closed 2 months ago

AnAwesomGuy commented 10 months ago

So basically, MinecraftApi#getVersionsInRange throws if includeSnapshots is false and either the start or end versions are not releases.

I'm suggesting that if includeSnapshots is false and either the start or end versions are not releases, instead of throwing, it should just get the next release after that snapshot. Hopefully this shouldn't be hard to implement.

modmuss50 commented 10 months ago

Whats the reasoning/use case behind this?

AnAwesomGuy commented 10 months ago

as you can see here, i have a version range in my gradle.properties and i use it for publishing stuff and in my fabric.mod.json the version range fails on curseforge, as it contains a snapshot i could always access MinecraftApi manually and get the releases by myself, but it would be best if you could do this

modmuss50 commented 10 months ago

Im not too keen on this idea, curseforge only has a basic concept of snapshots.

AnAwesomGuy commented 10 months ago

It would just skip over the snapshots and ignore them, not add them to minecraftVersions.

You would only need to modify the MinecraftApi#getVersionsInRange method.

modmuss50 commented 2 months ago

As I said before I am not a massive fan of this idea, curseforge doesnt have a concept of snapshots so I dont think the version rage for it should do either.