Closed C0D3-M4513R closed 3 months ago
The code needs to be changed too
https://github.com/itzg/docker-minecraft-server/blob/master/scripts/start-deployKetting
...and that'll be a full re-write if GitHub releases are not used.
We still use GitHub releases for kettinglauncher.
We only removed Github Packages for org.kettinglauncher.server.fmlloader
, org.kettinglauncher.server.fmlcore
, org.kettinglauncher.server.forge
, org.kettinglauncher.server.javafmllanguage
, org.kettinglauncher.server.lowcodelanguage
and org.kettinglauncher.server.mclanguage
Depending on how many issues we have with other things, more of the Github Package publications might be deleted.
What is the structure of the downloads and how can the code identify latest version and/or lookup a download given user inputs?
Download the list of all available versions, according to the standard maven repo practices. Sort by Version, parse, sort, filter and grab the latest one.
For the server itself it would be the following to get all the versions: https://reposilite.c0d3m4513r.com/Ketting-Server-Releases/org/kettingpowered/server/forge/maven-metadata.xml For the kettinglauncher: https://reposilite.c0d3m4513r.com/Ketting/org/kettingpowered/kettinglauncher/maven-metadata.xml
Getting all versions: https://github.com/kettingpowered/kettinglauncher/blob/0ad674f6bdd682d0643d42fe872cc9fa6c4f7a1b/src/main/java/org/kettingpowered/launcher/KettingLauncher.java#L106-L107
Filtering the versions: https://github.com/kettingpowered/kettinglauncher/blob/0ad674f6bdd682d0643d42fe872cc9fa6c4f7a1b/src/main/java/org/kettingpowered/launcher/KettingLauncher.java#L267-L271
Parsing the versions: https://github.com/kettingpowered/kettingcommon/blob/be7b6dff1701fc314453f0eb5380a83c87248a0d/src/main/java/org/kettingpowered/ketting/internal/MajorMinorPatchVersion.java#L76-L101
Or here is the code for our Website's download page, which also displays all versions in order: https://github.com/kettingpowered/Site/blob/master/src/views/Download.vue
And here is a command that outputs a list of versions : curl https://reposilite.c0d3m4513r.com/Ketting-Server-Releases/org/kettingpowered/server/forge/maven-metadata.xml | xq | yq .metadata.versioning.versions.version | sed -e 's/\[//' -e 's/\]//' -e 's/\W"//' -e 's/",//'
(using https://github.com/kislyuk/yq)
Also given that Github Packages only allows users authenticated with github to download anything, this change should not impact this project at all.
Gotcha, now I understand how it only needed to be a docs change.
We removed Github Packages, because they kept failing our publishes and causing pain for us.