Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0 #78

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
98a0f69
improve spigot resource checker
Konicai Jul 6, 2021
11aa038
add (unused) scheduler interface and implementations
Konicai Jul 6, 2021
5b83d05
some more abstraction stuff
Konicai Jul 6, 2021
4043c42
improve scheduler
Konicai Jul 6, 2021
c265eec
more stuff
Konicai Jul 6, 2021
bd2828a
slightly update velocity to new stuff
Konicai Jul 7, 2021
d54a15f
more progress (more mess)
Konicai Jul 15, 2021
f3198c8
dump changes
Konicai Aug 1, 2021
69f8483
intitial age stuff impl
Konicai Aug 5, 2021
cf13093
implement DownloadManager and finish Updatable
Konicai Aug 6, 2021
e7f5a1a
add a hang checker to DownloadManager, implement cancellable tasks, r…
Konicai Aug 10, 2021
b7830e1
Merge branch 'main' into 1.6.0
Konicai Aug 10, 2021
5b188dc
refactor download manager
Konicai Aug 10, 2021
8edda10
allow for more dynamic download locations
Konicai Aug 12, 2021
9205980
cleanup download/update stuff
Konicai Aug 12, 2021
9a842f4
dependency injection refactor
Konicai Aug 13, 2021
ace1f36
tie ends with download manager
Konicai Aug 13, 2021
fa6b1d8
add ability to compare file hashes
Konicai Aug 15, 2021
63c9bef
finish providers, cleanup
Konicai Aug 17, 2021
206ae1b
More cleanup, changes to config
Konicai Aug 18, 2021
dfb97e4
dump changes
Konicai Aug 19, 2021
eb4934e
fully implement spigot and bungeecord, other stuff
Konicai Aug 22, 2021
25aaed6
fix building
Konicai Aug 22, 2021
eadbb4c
fix velocity
Konicai Aug 22, 2021
04b4160
add jackson core and annotations
Konicai Aug 22, 2021
51872c0
shade jackson, transfer to dev.projectg
Konicai Aug 23, 2021
1d50184
fix getting git.properties
Konicai Aug 23, 2021
1046d20
fix floodgate and geyser artifact links
Konicai Aug 23, 2021
37c3442
fix getting build number from jenkins
Konicai Aug 23, 2021
140f2ed
make sure to flag updatable as DOWNLOADING before downloading
Konicai Aug 23, 2021
cf8c3ad
fix update manager when reaching end of queue
Konicai Aug 23, 2021
989567f
Create devconfig.yml
Konicai Aug 23, 2021
ea0e4b3
update deploy script
Konicai Aug 23, 2021
c62bfbb
fix downloading, hash checking, other improvements
Konicai Aug 23, 2021
abae873
improve WebUtils#connectionToString
Konicai Aug 24, 2021
3771d7b
add some safety to shutting down while downloads are happening
Konicai Aug 24, 2021
cb9a4ba
implement hack to improve shutdown safety on bungeecord
Konicai Aug 25, 2021
8baf80e
improve bungee hack, don't disable plugin on certain plugin info load…
Konicai Aug 25, 2021
0b294fa
fix debug logging on bungee
Konicai Aug 25, 2021
184cac5
add todo
Konicai Aug 25, 2021
37ed4ad
update bukkit 1.8 to spigot 1.12
Konicai Aug 28, 2021
f092ce3
update some names
Konicai Oct 2, 2021
0c7d0fb
Dump dirty, broken config changes
Konicai Jan 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions src/main/resources/config.toml → devconfig.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
# GeyserUpdater
# GeyserUpdater configuration with more settings enabled
# Made by Jens & YHDiamond

# NOTICE: Please read the README on our github page for full information regarding these options!
# https://github.com/ProjectG-Plugins/GeyserUpdater

# If enabled, GeyserUpdater will check for new Geyser builds on server start, and on the interval specified by Auto-Update-Interval. If a new build exists, it will be downloaded.
Auto-Update-Geyser=false
default-updates:
geyser:
enable: true
auto-check: true
auto-update: true
floodgate:
enable: false
auto-check: true
auto-update: false

# The interval in hours between each auto update check.
Auto-Update-Interval=24
auto-update-interval: 24
# The maximum amount of seconds that a download is allowed to run for. Increase if you are running into issues on a slow internet connection.
download-time-limit: 300
# Delete the downloaded file if the file hash of the downloaded file did not match what the download server provided.
# Or if the file hash was not checked and the download time limit was reached, or an exception occurred.
# If the file hash is not correct the downloaded file is likely corrupt or unfinished.
delete-on-fail: true

# If enabled, GeyserUpdater will attempt to restart the server 10 seconds after a new version of Geyser has been successfully downloaded.
# If you aren't using a hosting provider or a server wrapper, you will need a restart script.
Auto-Restart-Server=false
auto-restart-server: true
# When enabled, GeyserUpdater will automatically generate a restart script for you. If you are using CraftBukkit or a proxy
# you will need to use the generated script to start your server! If you are using a hosting provider or a server wrapper you probably don't need this.
Auto-Script-Generating=false

auto-script-generating: true
# Configure the message that is sent to all online players warning them that the server will be restarting in 10 seconds.
Restart-Message-Players='&2This server will be restarting in 10 seconds!'
restart-message-players: "§2This server will be restarting in 10 seconds!"

# Enable debug logging
Enable-Debug=false

enable-debug: true
# Please do not change this version value!
Config-Version=2
config-version: 3
65 changes: 26 additions & 39 deletions guDeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ waterDir="Waterfall-guDeploy"
velocityDir="Velocity-guDeploy"

#Links
guLink="https://ci.projectg.dev/job/GeyserUpdater/job/1.5.0/lastSuccessfulBuild/artifact/target/GeyserUpdater-1.5.0.jar"
geyserLink="https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/720/artifact/bootstrap/"
guLink="https://ci.projectg.dev/job/GeyserUpdater/job/1.6.0/lastSuccessfulBuild/artifact/target/GeyserUpdater-1.6.0.jar"
geyserLink="https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/821/artifact/bootstrap/"

buildToolsLink="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
paperLink="https://papermc.io/api/v2/projects/paper/versions/1.16.5/builds/750/downloads/paper-1.16.5-750.jar"
paperLink="https://papermc.io/api/v2/projects/paper/versions/1.17.1/builds/209/downloads/paper-1.17.1-209.jar"
bungeeLink="https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar"
waterLink="https://papermc.io/api/v2/projects/waterfall/versions/1.16/builds/425/downloads/waterfall-1.16-425.jar"
velocityLink="https://versions.velocitypowered.com/download/1.1.5.jar"
waterLink="https://papermc.io/api/v2/projects/waterfall/versions/1.17/builds/448/downloads/waterfall-1.17-448.jar"
velocityLink="https://versions.velocitypowered.com/download/3.0.0.jar"


echo "[WARN] This script can generate up to 500MB of data!"
Expand All @@ -40,12 +40,20 @@ else
fi

# Download file for a given link
# first arg is link, second arg is output file name (optional)
download () {
jarURL="$1"
if [[ "$downloadCmd" == "curl" ]]; then
curl "$jarURL" -O
if [[ -z "$2" ]]; then
curl "$1" -O
else
curl "$1" --output "$2"
fi
else
wget "$jarURL"
if [[ -z "$2" ]]; then
wget "$1"
else
curl "$1" --output-document "$2"
fi
fi
}

Expand All @@ -57,56 +65,35 @@ getAllPlugins () {
mkdir "$pluginCache"
cd "$pluginCache" || exit

mkdir Common
cd Common || exit
mkdir "Common"
cd "Common" || exit
mkdir "GeyserUpdater"
cd "GeyserUpdater" || exit
echo
echo "[INFO] Downloading GeyserUpdater config"
download "https://raw.githubusercontent.com/ProjectG-Plugins/GeyserUpdater/1.6.0/devconfig.yml" "config.yml"
cd ../
echo
echo "[INFO] Downloading GeyserUpdater"
download "$guLink"
cd ../

mkdir "Spigot"
cd "Spigot" || exit
mkdir "GeyserUpdater"
cd "GeyserUpdater" || exit
echo "Auto-Update-Geyser: true
Auto-Restart-Server: true
Restart-Message-Players: '&2This server will be restarting in 10 seconds!'
Auto-Script-Generating: true
Enable-Debug: true
Config-Version: 2" > config.yml
cd ../
echo
echo "[INFO] Downloading Geyser-Spigot.jar"
download "$geyserLink"spigot/target/Geyser-Spigot.jar
cd ../

mkdir BungeeCord
cd BungeeCord || exit
mkdir GeyserUpdater
cd GeyserUpdater || exit
echo "Auto-Update-Geyser: true
Auto-Restart-Server: true
Restart-Message-Players: '&2This server will be restarting in 10 seconds!'
Auto-Script-Generating: true
Enable-Debug: true
Config-Version: 2" > config.yml
cd ../
mkdir "BungeeCord"
cd "BungeeCord" || exit
echo
echo "[INFO] Downloading Geyser-BungeeCord.jar"
download "$geyserLink"bungeecord/target/Geyser-BungeeCord.jar
cd ../

mkdir "Velocity"
cd "Velocity" || exit
mkdir "geyserupdater"
cd "geyserupdater" || exit
echo "Auto-Update-Geyser=true
Auto-Restart-Server=true
Restart-Message-Players='&2This server will be restarting in 10 seconds!'
Auto-Script-Generating=true
Enable-Debug=true
Config-Version=2" > config.toml
cd ../
echo
echo "[INFO] Downloading Geyser-Velocity"
download "$geyserLink"velocity/target/Geyser-Velocity.jar
Expand Down
93 changes: 51 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,90 +4,78 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.projectg</groupId>
<groupId>dev.projectg</groupId>
<name>GeyserUpdater</name>
<artifactId>GeyserUpdater</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jackson.version>2.10.2</jackson.version>
</properties>

<repositories>
<repository>
<id>bungeecord-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>velocity</id>
<url>https://nexus.velocitypowered.com/repository/maven-public/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>opencollab-release-repo</id>
<url>https://repo.opencollab.dev/maven-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>opencollab-snapshot-repo</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>velocity</id>
<url>https://nexus.velocitypowered.com/repository/maven-public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.16-R0.5-SNAPSHOT</version>
<type>jar</type>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.16-R0.5-SNAPSHOT</version>
<type>javadoc</type>
<groupId>com.github.SpigotMC.BungeeCord</groupId>
<artifactId>bungeecord-proxy</artifactId>
<!-- Provides easier access to BungeeCord classes unavailable in the api -->
<version>a7c6ede</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.velocitypowered</groupId>
<artifactId>velocity-api</artifactId>
<version>1.1.8</version>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<!-- for logging on velocity -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.2</version>
<scope>provided</scope>
</dependency>
<!-- for our configuration -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<groupId>org.spongepowered</groupId>
<artifactId>configurate-yaml</artifactId>
<version>4.1.2</version> <!-- this may not be the latest available version -->
</dependency>
<!-- For nullability annotations -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<!-- Misc -->
<dependency>
<groupId>org.geysermc</groupId>
<artifactId>connector</artifactId>
<version>1.4.0-SNAPSHOT</version>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -109,6 +97,27 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>org.spongepowered.configurate</pattern>
<shadedPattern>dev.projectg.geyserupdater.shaded.configurate</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading