Created
August 9, 2019 20:39
-
-
Save fengye/6cc9ac102661176c1ab666e231fb950e to your computer and use it in GitHub Desktop.
Find and build latest spigot minecraft server, suitable for daily or periodic build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
latest=$(python find_latest_spigot.py) | |
stored_latest=$(<latest.txt) | |
echo Last stored Spigot version $stored_latest | |
if [ $stored_latest == $latest ]; then | |
echo Latest version $latest remains unchanged, not building. | |
else | |
echo Building Spigot version $latest | |
echo $latest > latest.txt | |
java -Xmx1024M -jar BuildTools.jar --output-dir ./daily_build/ --rev $latest | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import requests | |
url = 'https://mcmirror.io/api/file/spigot/spigot-latest.jar' | |
resp = requests.get(url = url) | |
data = resp.json() | |
print(data["mc_version"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment