modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
929 stars 174 forks source link

Idea for automatic pre-filling of version info #1732

Open Andre601 opened 1 year ago

Andre601 commented 1 year ago

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

An option to define data for versions in the project type's specific coniguration file, that Modrinth could extract for the version to be used in.

As an example, here is a mockup for a plugin supporting Paper and Purpur (But not Spigot) and versions 1.19 through 1.19.3:

name: MockupPlugin
author: Someone
version: 1.0.0

main: com.example.mockupplugin.MockupPlugin

api-version: 1.19

softdepend:
  - SomeDependency

modrinth:
  title: '{name} {version} {platform}' # Would override the version title to your format
  dependencies:
    - somedependency:optional # <slug|id>:<required|optional|...>[:<version>]
  loaders:
    - Paper
    - Purpur
  game-versions:
    - 1.19
    - 1.19.1
    - 1.19.2
    - 1.19.3

With this file would Modrinth now scan the jar, detect the modrinth section and set values as defined in the respective option. If not present would it use whatever information it could extract from the info file and otherwise use info from somewhere else (i.e. the file's name).

Of course, this is only for when Modrinth doesn't do this already. From my testing does it already extract some info from the file? Otherwise idk how it pre-fills the versions (other than maybe using from last release?)

Of course, not every project type may have a file for settings and whatnot, but in that case could perhaps a dedicated file be provided (And thinking about it, this would probs be the best solution in general for all project types to keep things organized and avoid issues with more strict file loading).

I really hope you understand what I'm talking about here...

Describe alternatives you've considered

No response

Additional context

No response

PikaMug commented 4 months ago

This would be nice for projects which support a wide range of game versions and currently have to spam-click the dropdown in Metadata when uploading.