Skip to content

When using MODRINTH_PROJECTS, figure out the highest VERSION instead of using very latest MC version #3577

@Cameronsplaze

Description

@Cameronsplaze

Enhancement Type

Improve an existing feature

Describe the enhancement

Right now, if you don't have VERSION declared, it defaults to the very latest MC version (currently 1.21.8). Then with the following MODRINTH_PROJECTS:

    MODRINTH_PROJECTS: |
      viaversion
      viabackwards
      griefprevention
      discordsrv

It fails with:

[mc-image-helper] 19:20:10.560 ERROR : Invalid parameter provided for 'modrinth' command: No files are available for the project 'GriefPrevention' for loader paper and Minecraft version 1.21.8

And obviously if you set the VERSION lower manually, it works.

Is there a way to switch the two checks? First grab the plugins and see what the latest possible is, then pass THAT to VERSION to download the right jar. This would let me jump up to the next version without constantly checking each plugin. It has viaversion/viabackwards so you don't need the exact version as the server to connect anyways, if you were expecting one version but it got upgraded on startup.

I don't think this would break any backwards compatibility either, since it's letting more configurations work instead of less. However you could add some sort of MODRINTH_VERSION_CHECK=True to be safe, and make sure it's not declared at the same time as VERSION=<whatever>.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions