Commit ceea9de
scripts/update_server.sh: deploy via git-tracked staging tree
The previous rsync swept the whole working tree, relying on an
allow-list of excludes to keep secrets out. Codex review flagged it:
generic scratch (pass.dat, x.dat, way.txt), local-only scripts,
*.orig from a recent merge etc. weren't covered, so a fresh untracked
file in the local cwd would silently ship.
Switch to deny-by-default. Build a temporary staging tree from
'git ls-files --recurse-submodules' (so modules/mavlink/* lands
along with the top-level files), filter out paths that resolve to a
directory (uninitialised nested submodules — cp without -r would
otherwise fail), then rsync that staging tree to the remote. Local
dry-run confirms pass.dat / x.dat / way.txt / .webadmin_secret /
fullchain.pem / keys.tdb / AGENTS.md / *.orig / *.rej / etc. all
stay behind, while the 477 tracked files (including the mavlink
submodule and .git/) ship correctly. Uncommitted edits to TRACKED
files still go through; only NEW files now have to be git add'd
before they're deployable, which is reasonable hygiene.
RSYNC_EXCLUDES is unchanged — the staging side is already clean,
so the excludes' job is now just protecting server-side state
(keys.tdb, *.pem, logs/, .webadmin_secret) from --delete.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f8a49b8 commit ceea9de
1 file changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
63 | 95 | | |
64 | 96 | | |
65 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
66 | 101 | | |
67 | | - | |
| 102 | + | |
68 | 103 | | |
69 | 104 | | |
70 | 105 | | |
| |||
0 commit comments