GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.25k stars 813 forks source link

[Bug]: LinuxGSM downloads old script files because GitHub caches files for up to 5 minutes #4528

Closed MicLieg closed 1 week ago

MicLieg commented 7 months ago

User story

As a developer wanting to contribute to LinuxGSM, i want to avoid having to wait for GitHubs cache to expire.

Game

All

Linux distro

Ubuntu 22.04

Command

command: update-lgsm

Further information

When developing LinuxGSM, a developer may want to quickly check that a change works as intended, and update the modules used by LinuxGSM immediately after pushing changes to GitHub. If the changes were pushed too recently, GitHub will cache the old version of the files for up to 5 minutes.

To circumvent this behaviour, Cache-Control and Pragma headers can be added to all curl commands when LinuxGSM's developer mode is enabled. This will force GitHub to respond with the most recent version of the files.

curl -H "Cache-Control: no-cache" -H "Pragma: no-cache" [...] [URL]

Relevant log output

No response

Steps to reproduce

  1. Install any gameserver
  2. Change the LinuxGSM branch (to a branch from a fork)
  3. Push changes to the branch you are using
  4. Remove modules / update LinuxGSM
  5. Download the old version of the changed files from GitHub
    • This may only happen if the files have been requested within the last 5 minutes.
dgibbs64 commented 3 months ago

this is honestly going to be very useful for me.