Show the deployed commit as a hover tooltip on the topbar brand
ASSET_VERSION only proves *a* deploy happened recently, not *which* commit -- not enough to answer "did my push actually deploy, or am I looking at a stale browser cache" (today's actual answer: neither -- deploy was current, a GeoJSON cache predating a code change was just never invalidated, since it only checks the source .gpx's mtime). The CI deploy job now writes REVISION (short SHA) before dropping .git; app.rb reads it at boot, falling back to "dev" locally/in CI's own check job where the file never exists.
This commit is contained in:
1 parent
750f6c8fb0
commit
37bc14f3ba
4 files changed
+28
-2
No files matched your search
@@ -54,6 +54,14 @@ jobs:
|
||||
fetch --depth 1 origin "${{ gitea.sha }}"
|
||||
git checkout -q FETCH_HEAD
|
||||
|
||||
# Read by app.rb at boot and shown (as a hover tooltip on the topbar
|
||||
# brand) so it's possible to tell which commit is actually live
|
||||
# without digging through `tea actions runs list` — written here,
|
||||
# before .git gets dropped below, since that's otherwise the only
|
||||
# place the commit is recorded.
|
||||
- name: Write REVISION
|
||||
run: git rev-parse --short HEAD > REVISION
|
||||
|
||||
# Clears out everything in the target except data/ (uploaded GPX
|
||||
# files, offline.pmtiles) and copies the fresh checkout over, dropping
|
||||
# .git afterwards. Dotfiles like .env (deployment secrets) are left
|
||||
|
||||
Reference in new issue
Block a user