LunarClient / Apollo

Next-generation Lunar Client server API
https://lunarclient.dev
MIT License
65 stars 15 forks source link

Feature - Apollo Updater #117

Closed ItsNature closed 5 months ago

ItsNature commented 5 months ago

Overview

Description: Add an updater that can be run with /apollo update

Changes: Add an updater that updates Apollo to the latest available version.

How it works:

  1. Retrieve Apollo assets (Done only on server startup)
  2. Locate the current jar file in use by Apollo (e.g. apollo-bukkit-1.0.8.jar).
  3. Determine the download URL tailored to the platform in use.
  4. Define the name & path for the updated jar file (e.g. /home/server/apollo-bukkit-1.0.9.jar).
  5. Initiate the file download process using the DownloadFileRequest request.
  6. If the download succeeds, the old Apollo jar file will be deleted during the server shutdown.

Add /apollo update command

Add ApolloHttpManager#download(DownloadFileRequest) for file downloading

Review Request Checklist