fix: update-config can actually run, and removes files deleted upstream - #16
Open
s950tx16wasr10 wants to merge 1 commit into
Open
fix: update-config can actually run, and removes files deleted upstream#16s950tx16wasr10 wants to merge 1 commit into
s950tx16wasr10 wants to merge 1 commit into
Conversation
Two bugs that combined to make the config sync silently broken. The
title_screens/images/novahippie.png file was deleted from the config
repo but stayed on the live server because:
1. globals.env never exported TGS_INSTANCE_ROOT. update-config.sh and
parse-server.sh both reference it, so every invocation died with
"TGS_INSTANCE_ROOT: unbound variable" the moment TGS triggered
PreCompile or RepoFetch. The script was effectively a no-op.
2. Even after that, `git reset --hard origin/main` doesn't drop
untracked files, and files commit-deleted upstream linger as
untracked in the working tree. The original comment correctly
warned against `git clean -fdx` (would wipe operator-managed media
in jukebox_music/, title_music/, reboot_themes/) but unscoped
`git clean -fd` would catch top-level operator uploads too. The fix
limits the clean to dirs that are 100% repo-managed: ${SERVER}/ and
title_screens/.
Live server already patched out-of-band:
- /etc/tgs-EventScripts.d/reduxstation/globals.env has TGS_INSTANCE_ROOT
appended.
- /tgs_instances/.../title_screens/images/novahippie.png removed by
`git clean -fd title_screens/`.
A redeploy-host run will pick up these tracked fixes via install-eventscripts.sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs that combined to make config sync silently broken. `title_screens/images/novahippie.png` was deleted from the config repo but stayed on the live server because:
`globals.env` never exported `TGS_INSTANCE_ROOT`. `update-config.sh` and `parse-server.sh` both reference it, so every TGS-triggered invocation died with "TGS_INSTANCE_ROOT: unbound variable" the moment PreCompile or RepoFetch fired. The script was effectively a no-op.
`git reset --hard origin/main` doesn't drop untracked files. Files commit-deleted upstream linger as untracked in the working tree. The original comment correctly warned against `git clean -fdx` (would wipe operator-managed media in `jukebox_music/`, `title_music/`, `reboot_themes/`), but unscoped `git clean -fd` would still catch top-level operator uploads. The fix scopes `git clean -fd` to the dirs that are 100% repo-managed: `${SERVER}/` and `title_screens/`.
Live server already patched out-of-band so the title screen is correct right now:
A `deploy/install-eventscripts.sh` re-run on the host picks up these tracked fixes.