Skip to content

Commit 9f09c13

Browse files
committed
Refactor DEV version injection to update UI display and JS constant with DEV-EPOCH format
1 parent 2c49eb2 commit 9f09c13

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ jobs:
5858
5959
# Inject DEV version (visual display) and JS constant with DEV-EPOCH format
6060
DEV_EPOCH=$(date -u +%s)
61-
sed -i 's|MeshCore Wardrive</h1>|MeshCore Wardrive <span class="text-sm text-slate-400">DEV-'"${DEV_EPOCH}"'</span></h1>|' _site/dev/index.html
61+
# Replace the visible version in the dedicated span (this is what the UI shows)
62+
sed -i 's|<span id="appVersion"[^>]*>[^<]*</span>|<span id="appVersion" class="text-sm text-slate-400">DEV-'"${DEV_EPOCH}"'</span>|' _site/dev/index.html
63+
# Inject into JS constant
6264
sed -i 's|const APP_VERSION = "UNKNOWN";|const APP_VERSION = "DEV-'"${DEV_EPOCH}"'";|' _site/dev/content/wardrive.js
63-
65+
6466
find _site -name ". git" -exec rm -rf {} + 2>/dev/null || true
6567
find _site -name ".github" -exec rm -rf {} + 2>/dev/null || true
6668

0 commit comments

Comments
 (0)