This is a script that will keep your server up-to-date when run on a schedule. See the README for full details, but essentially you just modify what folder it should look in and it will do the rest.
Windows only for now (as it uses Powershell). Once I can build a test Linux box I will develop something there, or someone else can contribute
If you encounter any problems, feel free to post to this topic or create a Github issue. Enjoy.
UPDATED
Released v1.1 which fixes the script removing old files before successfully downloading the new one. Also adds -KeepDownload option if you wish to hold onto the downloaded updates for whatever reason.
I wouldn’t worry about building a “test Linux box”, since the elements aren’t in any big hurry to build or maintain theirs either. Consequently, Linux updates have been a little spotty (in comparison to Windows build updates).
Not sure if Linux support will be added. Linux builds are inconsistent and the script can only find the latest version by tag (can’t parse the actual list on the download page anymore)…unless someone has a better way.
Worst case, I build a quick python bot to loop scrape the build links and check the for the highest number and only take that string and vs the server version with it.
I’ll let you know how I go with the testing eitherway.
A couple of months ago I gave up on developing an auto updater because for me it was pretty clear that the FiveM team didn’t wanted one.
The fact that they have cloudflare “turned up to 11” in the server artifacts page and not in the client page indicates that the protection is not there because of DDoS.
Probably because scraping the page was something they didn’t want due to load. That’s why this script uses Github’s API to find the releases and generate the direct download link. Much less load that way.
Released v1.1 which fixes the script removing old files before successfully downloading the new one. Also adds -KeepDownload option if you wish to hold onto the downloaded updates for whatever reason.
Full changelog:
Ensure new artifact can be downloaded before removing old files
Exempt .zip files from purge
Added -KeepDownload flag, specifying will keep the newly downloaded artifact zip.
Exempt .crt and .key from purge so custom-signed certs are never deleted.