Closed jmiahman closed 6 years ago
I'm not that familiar with Sponge. Do you prefer the SpongeForge or SpongeVanilla variant?
Spongevanilla would be the easiest
On Thu, May 12, 2016, 5:59 PM Geoff Bourne notifications@github.com wrote:
I'm not that familiar with Sponge. Do you prefer the SpongeForge or SpongeVanilla variant?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/itzg/dockerfiles/issues/78#issuecomment-218926511
Just to let you know, Sponge.. though slow going.. Is a new API for minecraft plugins. A lot of developers from Bukkit, when the big blowup happened left, merged with a few other projects and created Sponge. It's a fairly nice community to work with and though it's still in it's BETA phase, has many useful plugins already offered. When Bukkit was still a thing I first tried Spigot and didn't care for their community, so when Bukkit died and Spigot took over in a sense.. Sponge was there and was a compelling alternative.
That's cool. Thanks for the background.
I didn't get a chance to work on this over the weekend. Speaking of which, you're welcome to contribute the changes to add support.
...ok, the build is gradle based, so the remaining trickiness is mapping versions, picking the latest, etc. For the prebuilt 1.8.9 and below, we'll need to see if their site exposes a REST API to resolve versions to download URLs.
Here's the script I run to download the latest "bleeding" versions that's TypeId=2 (1.9) in the URL and the stable 1.8.9 is TypeId=1, I guess really you don;t have to build it. I was for a bit when they weren't doing bleeding builds for 1.9. Now we can just grab the jar.
#!/usr/bin/env bash
wget https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/?buildTypeId=2 -O sponge_page
latest_sponge=$(grep -m1 "btn btn-default" ./sponge_page |cut -d'"' -f4)
wget "$latest_sponge" -O latest_sponge.jar
I finally got around to this...and then found their sites aren't cooperating right now
Sorry about that
https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/?buildTypeId=2
Should work now.
On Sat, May 28, 2016, 6:29 PM Geoff Bourne notifications@github.com wrote:
I finally got around to this...and then found their sites aren't cooperating right now
[image: image] https://cloud.githubusercontent.com/assets/988985/15630880/e797faf2-2512-11e6-87ed-8bb853976794.png
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/itzg/dockerfiles/issues/78#issuecomment-222337579, or mute the thread https://github.com/notifications/unsubscribe/AAbY8hixUWN5N7BAufCBOV6903Jjl3pMks5qGOwQgaJpZM4IdhfN .
Yep, now their servers are good :)
Some notes:
https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/?buildTypeId=:buildType&startAt=:startAt
Each artifact version string is text of
body > div.container > div > div > ol.builds > li:nth-child(*) > span
Each artifact at
body > div.container > div > div > ol.builds > li:nth-child(*) > ul.build-artifacts > li.build-artifact.build-artifact-primary > a
Versioning, example
1.9.4-5.0.0-BETA-30
Nice, Great Job!
I'm getting closer. I have created a little tool in Go that scrapes and converts page segments to JSON:
https://github.com/itzg/restify
Now to slice and dice it with jq...
It's certainly uglier than the grep approach, but here's a "restify | jq" solution:
restify --class builds https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/?buildTypeId=2 | \
jq -r '.[].elements[0].elements[]|select(.class=="build-artifacts")|.elements[]|select(.class|contains("primary"))|.elements[0].href'
More restify | jq notes:
Get just the newest build's version
jq -r '.[0].elements[0].elements[] | select(.class == "build-version").text'
Produces
1.9.4-5.0.0-BETA-62
Get the URL of that build
jq -r '.[0].elements[0].elements[] | select(.class == "build-artifacts").elements[0].elements[0].href'
produces
https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/1.9.4-5.0.0-BETA-62/spongevanilla-1.9.4-5.0.0-BETA-62.jar
This may be useful, not so sure. I'm currently building this project, https://github.com/NynjaCypher/sf-version-mapper, however it's not fully operational yet so I'll keep you all posted. It will scrape files.minecraftforge.net and the SpongeForge repository and map them together, cache the results in Redis, so that a Forge version can be easily retrieved from a SpongeForge one.
Thanks @NynjaCypher and thanks for reminding me of this thread.
Is it planned to continue development of Sponge integration?
I'd still like to support Sponge but obviously it is taking way too long for me to get to it. I'll have to look around again, perhaps some of the version lookup logic is easier now.
If you agree, I can try to do it.
That would be great!
Working on it. Thanks!!
I can't push new branches!!
@itzg ??
Fork and submit a PR...
@s0rcerer88 sorry for the delay. Yes, as @NynjaCypher mentioned, you'll fork and then submit a PR via your fork. Here is Github's docs on working with forks
https://help.github.com/articles/working-with-forks/
but since you have likely cloned itzg/dockerfiles
and made changes in your local clone you'll roughly follow these steps:
master
branch of your repo as a new local branchOhh. Thanks for the info. My very first time using GitHub.
PR sent.
SpongeVanilla integration completed. Changes merged. SpongeForge integration in progress.
Great news, thanks for this! 👍
Is any chance for SpongeForge integraftion?
@RoSulek1 oops, looks like this issue got completed successfully. I know that because I can see the code in place should make it fairly easy to add SpongeForge. Can you create a new issue for that specifically?
Done [https://github.com/itzg/dockerfiles/issues/245] thx :)
You can add sponge as well, and maybe build it from git as bleeding right now is 1.9. If you need help on how to build it, let me know.