NewAmazingPVP / AutoUpdatePlugins

Automatically update any spigot/bungeecord/velocity plugin you wish!
MIT License
11 stars 2 forks source link

Jenkins/Github multiple downloads problem #9

Closed Kaerix closed 5 months ago

Kaerix commented 9 months ago

Hi, I'm having an issue downloading each EssentialsX plugin straight from Jenkins, because of the fact that your plugin only seems to support downloading the first jar available, so for example:

Downloading EssentialsX from Jenkins, it only always downloads the first jar and I'm unable to automatically download EssentialsXChat/Discord/Spawn

Downloading AuthMeReloaded from Jenkins, it downloads the first jar, which on the site is actually the javadoc jar, which is not even the plugin.

Please, if it's possible, add support to search a specific jar name or use custom links from where the plugin should download (by that I mean like searching EssentialsX-.jar or EssentialsXChat-.jar on Jenkins and have the plugin download the first jar it sees)

Thank you so much for your plugin as it works perfectly except for this small issue 😊

NewAmazingPVP commented 8 months ago

Thank you for your kind words! And sorry for not replying, as I have been a bit busy lately. Multiple artifacts are an interesting issue to implement as to how to let people choose which artifacts or jars to download. I'll look into adding this feature and fixing AutoMeReloaded Jenkins, and I will let you know why I do it!. 

NewAmazingPVP commented 5 months ago

Hey, I am so sorry for not working on this. I have very bad time management and almost forgot about this so sorry. Since I have some free time now, I have made a beta build that would fix the AuthMeReloaded Jenkins while I am working on implementing multiple artifacts. It would be great if you could test it out and let me know if it works as intended. 

NewAmazingPVP commented 5 months ago

@Kaerix

NewAmazingPVP commented 5 months ago

Hey @Kaerix I have now also added multi-artifact support in this build. For example, if you want essentials chat, you can do this in list.yml EssentialsXChat: https://github.com/EssentialsX/Essentialsmulti[3]Since its 3rd artifact in the release imageSo basically, for any multi-artifact plugins on github, paste their normal link and add multi[num], where num is the artifact number. So for essentials chat, it would be: https://github.com/EssentialsX/Essentials + multi[3] = https://github.com/EssentialsX/Essentialsmulti[3].

NewAmazingPVP commented 5 months ago

Let me know if you want me to add anything else! This is implemented in the new released version.

Kaerix commented 5 months ago

Wonderful, thank you so much! Will test later today

Kaerix commented 5 months ago

Hi, GitHub multi-download works <3, but what about Jenkins? I tried to use the "multi[x]" at the end but I think it just works on GitHub. Is there a way you could implement so that when the plugin gets the API/JSON link, you are able to choose which artifact it downloads from? Screenshot 2024-06-11 143950 image

Thanks in advance!

NewAmazingPVP commented 5 months ago

Hey @Kaerix So the AuthMeReloaded is already fixed because in code I have made it so that it automatically ignores sources/legacy/javadoc jars and downloads the right one. Though I do see how having a multiartifacts option in there might potentially helpful for other Jenkins. Are you aware of any other Jenkins that have multiple actual plugin jars, such as Essentials? By the way, instead of multi[num], I will just make it so that you only have to put [num] at the end. 

Kaerix commented 5 months ago

Oh, okay! There is also https://ci.lucko.me/job/spark/ and https://ci.lucko.me/job/LuckPerms/ For me, EssentialsX jenkins multi downloads would be essential for my server to work, as the only versions that support 1.20.6 are the dev versions, most easily downloaded from their Jenkins page

NewAmazingPVP commented 5 months ago

Thank you for linking me to these jenkins. I see now why multi artifacts would be useful for jenkins as well. Here so I'll do this, to avoid confusion I'll remove auto checks for javadocs/sources/etc jar, but users can specify what jar they want from jenkins as well by doing [num] at end.

NewAmazingPVP commented 5 months ago

Hey @Kaerix Are you able to test this build I have added the Jenkins multi artifact support. Also, now for multi-artifacts, you don't have to do multi[num]; you just need [num] at the end. Please let me know if there are any issues.

Kaerix commented 5 months ago

OMG, it works great!

Kaerix commented 5 months ago

Also, one caveat I think could be an issue is for example, when I want to download AuthMeVelocity from Modrinth. I need the Paper version of the plugin. But the Modrinth page hosts both types (Velocity and Paper) of the plugin on one page. Does your plugin distinguish between those or only the latest will be downloaded? https://modrinth.com/plugin/authmevelocity/versions

This is a possible issue because I can just use the ones they release on github and pick the first artifact https://github.com/4drian3d/AuthMeVelocity/releases

NewAmazingPVP commented 5 months ago

It's great to hear it's working! Also, for Modrinth, I did realize that caveat and have already implemented auto-platform checking and it will download the right platform builds and distinguish between them, but I'm glad that you found that out and informed me.