Updating Resources
How to update a JG script without leaving old files behind
Don't overwrite the old resource with the new one. Files removed or renamed in the update can be left behind and cause errors.
Read the changelog
Check the changelog for the version you're installing. Follow any SQL or extra update instructions listed there before starting your server.
Back up your files
Make a copy of the current resource outside your server's resources folder. Back up your database too if the changelog includes SQL changes.
Keep the backup until you've finished testing the update.
Download the latest version
Download the resource again from the Cfx.re Portal. Extract the .pack.zip, then open the folder ending in -bundle to find the resource folder.
Remove the old resource
Stop your server, then remove the old resource folder from your server's resources folder. Don't merge the new files into it.
Add the new resource
Move the newly downloaded resource folder into your server's resources folder.
The changelog will list any config options added or changed in the update. Apply those changes to the new config files, then copy across the settings you intentionally changed.
As a final check, compare the old and new config files using your code editor's diff tool or Diffchecker. Don't replace the new config files with your old ones.
If you edited source-available files, reapply those changes to the new files. This keeps any fixes or changes included in the update.
Check for duplicate copies
Search your resources folder for the resource name. There should be one copy only. Check folders such as [jg], [standalone] and any old bundle folders.
The resource folder must not be nested inside another folder with the same name. For example, this is incorrect: resources/[jg]/jg-mechanic/jg-mechanic.
Restart and test
Fully restart your server. Check the server console for errors, then test the updated resource in game before removing your backup.