flasher: show current release version + notes (pipeline-driven)

The esp-web-tools manifest carried a frozen version:beta_1 while the rolling
/latest/ bins moved on, so the web flasher always said beta_1. Fix:
- scripts/build/gen-flasher-meta.py emits version.json (tag + notes) + per-release
  manifests (version=tag) into /latest/; release.sh + the CI workflow run it, so
  the metadata rolls with every release.
- the site points the install buttons at the VPS manifests and renders a live
  'What's new in <tag>' block from version.json.
- drop the frozen static site manifests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kaj SchittecatandClaude Opus 4.8 committed 2026-06-13 16:08:10 +02:00
1 parent 399b5004e0
commit a405513d84
7 files changed
+81 -28

No files matched your search

+6
View File
@@ -87,6 +87,11 @@ jobs:
done
ls -la dist
- name: Web-flasher metadata (version.json + manifests, roll with release)
env:
TAG: ${{ steps.v.outputs.tag }}
run: python3 scripts/build/gen-flasher-meta.py "$TAG" dist "release-notes/$TAG.txt"
- name: Create / update the GitHub Release
env:
GH_TOKEN: ${{ github.token }}
@@ -117,6 +122,7 @@ jobs:
scp -i ~/.ssh/id_deploy "dist/$n.bin" "dist/$n-merged.bin" "$VPS:$REL/"
scp -i ~/.ssh/id_deploy "dist/$n-merged.bin" "dist/$n.bin" "$VPS:$VPS_PATH/latest/"
done
scp -i ~/.ssh/id_deploy dist/version.json dist/manifest-tdeck.json dist/manifest-heltec-v4-tft.json "$VPS:$VPS_PATH/latest/"
$SSH "$VPS" "cd '$VPS_PATH/releases/TOUCH' && python3 -c \"import os,json; b=sorted(d for d in os.listdir('.') if d.startswith('beta_') and os.path.isdir(d)); open('index.json','w').write(json.dumps([{'name':x,'type':'dir'} for x in b], indent=2))\""
rm -f ~/.ssh/id_deploy
echo "Published $TAG to wadamesh.com"
+22 -2
View File
@@ -245,6 +245,10 @@
<button class="back" data-back>← choose a different path</button>
<div class="guide-head"><h3>Standalone install</h3></div>
<p class="p">Plug the device in over USB and flash it right here. Works in <b>Chrome</b> or <b>Edge</b> on desktop.</p>
<div data-whatsnew hidden style="margin:18px auto 0;max-width:560px;background:rgba(21,182,166,.07);border:1px solid rgba(21,182,166,.28);border-radius:12px;padding:13px 16px;text-align:left">
<div style="font-weight:600">What's new in <span data-wn-tag style="color:var(--teal)">the latest build</span></div>
<ul data-wn-notes style="margin:7px 0 0;padding-left:18px;font-size:.9rem;color:var(--mut);line-height:1.55"></ul>
</div>
<div class="steps" style="margin-top:22px">
<div class="step"><div class="num">1</div><div><h4>Connect over USB</h4><p>Plug your T-Deck or Heltec V4 into your computer with a data cable.</p></div></div>
<div class="step"><div class="num">2</div><div><h4>Pick your board &amp; install</h4><p>Hit <b>Install</b> below, choose the serial port, and let it flash. It does a clean full install.</p></div></div>
@@ -252,9 +256,9 @@
</div>
<div class="boards">
<div class="board"><h4>Heltec V4 + TFT</h4><p>ESP32-S3 with CHSC6x touch.</p>
<esp-web-install-button manifest="./manifest-heltec-v4-tft.json"></esp-web-install-button></div>
<esp-web-install-button manifest="https://firmware.wadamesh.com/latest/manifest-heltec-v4-tft.json"></esp-web-install-button></div>
<div class="board"><h4>LilyGo T-Deck / Plus</h4><p>ESP32-S3 keyboard handheld.</p>
<esp-web-install-button manifest="./manifest-tdeck.json"></esp-web-install-button></div>
<esp-web-install-button manifest="https://firmware.wadamesh.com/latest/manifest-tdeck.json"></esp-web-install-button></div>
</div>
<div class="noserial">Your browser can't flash here — use <b>Chrome</b> or <b>Edge</b> on a desktop.</div>
<p class="hint">T-Deck not detected? Hold the trackball while tapping reset to force download mode.</p>
@@ -379,6 +383,22 @@ We use no tracking, analytics, or advertising cookies. Our CDN and security prov
try { if (!localStorage.getItem('wm-cookie-ack')) cbar.classList.add('show'); } catch(_) {}
document.getElementById('cookieok').addEventListener('click', () => { cbar.classList.remove('show'); try { localStorage.setItem('wm-cookie-ack','1'); } catch(_) {} });
// Live release version + "what's new" — read from the firmware host so the
// flasher always reflects the current build (the release pipeline updates
// version.json; no site redeploy needed per release).
fetch('https://firmware.wadamesh.com/latest/version.json', {cache:'no-store'})
.then(r => r.ok ? r.json() : null)
.then(v => {
if (!v || !v.tag) return;
document.querySelectorAll('[data-wn-tag]').forEach(e => e.textContent = v.tag);
const notes = Array.isArray(v.notes) ? v.notes : [];
document.querySelectorAll('[data-wn-notes]').forEach(ul => {
ul.innerHTML = '';
notes.forEach(n => { const li = document.createElement('li'); li.textContent = n; ul.appendChild(li); });
});
if (notes.length) document.querySelectorAll('[data-whatsnew]').forEach(b => b.hidden = false);
}).catch(()=>{});
</script>
<!-- animated mesh backdrop — Vanta NET (3D dot-and-line network) in wadamesh teal on white.
-13
View File
@@ -1,13 +0,0 @@
{
"name": "wadamesh — Heltec V4 TFT",
"version": "beta_1",
"new_install_prompt_erase": true,
"builds": [
{
"chipFamily": "ESP32-S3",
"parts": [
{ "path": "https://firmware.wadamesh.com/latest/wadamesh-heltec-v4-tft-merged.bin", "offset": 0 }
]
}
]
}
-13
View File
@@ -1,13 +0,0 @@
{
"name": "wadamesh — LilyGo T-Deck",
"version": "beta_1",
"new_install_prompt_erase": true,
"builds": [
{
"chipFamily": "ESP32-S3",
"parts": [
{ "path": "https://firmware.wadamesh.com/latest/wadamesh-tdeck-merged.bin", "offset": 0 }
]
}
]
}
+4
View File
@@ -0,0 +1,4 @@
New WADAMESH boot logo + teal default theme
Wi-Fi scan no longer crashes when no network is connected
Wi-Fi settings apply live — no more reboot prompt
Factory reset now fully wipes the device (SD-storage fix)
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env python3
# Generate the web-flasher metadata that must roll with every release:
# - version.json : {tag, notes[]} — the site shows this ("what's new")
# - manifest-tdeck.json : esp-web-tools manifest (its "version" drives the
# - manifest-heltec-v4-tft.json install dialog, so it must equal the tag)
#
# These live next to the rolling bins at firmware.wadamesh.com/latest/, so the
# flasher always reflects the current release without a site redeploy.
#
# Usage: gen-flasher-meta.py <tag> <outdir> [notes_file]
# notes_file: one note per non-empty line (plain text); optional.
import sys, json, os
tag = sys.argv[1]
outdir = sys.argv[2]
notes_file = sys.argv[3] if len(sys.argv) > 3 else None
notes = []
if notes_file and os.path.exists(notes_file):
notes = [ln.strip() for ln in open(notes_file) if ln.strip() and not ln.startswith("#")]
os.makedirs(outdir, exist_ok=True)
with open(os.path.join(outdir, "version.json"), "w") as f:
json.dump({"tag": tag, "notes": notes}, f, indent=2)
BOARDS = {
"manifest-tdeck.json": ("wadamesh — LilyGo T-Deck", "wadamesh-tdeck-merged.bin"),
"manifest-heltec-v4-tft.json": ("wadamesh — Heltec V4 TFT", "wadamesh-heltec-v4-tft-merged.bin"),
}
for fn, (name, binf) in BOARDS.items():
manifest = {
"name": name,
"version": tag,
"new_install_prompt_erase": True,
"builds": [{
"chipFamily": "ESP32-S3",
"parts": [{"path": f"https://firmware.wadamesh.com/latest/{binf}", "offset": 0}],
}],
}
with open(os.path.join(outdir, fn), "w") as f:
json.dump(manifest, f, indent=2)
print(f"wrote version.json + 2 manifests for {tag} -> {outdir} (notes: {len(notes)})")
+5
View File
@@ -49,6 +49,11 @@ print(json.dumps([{"name": b, "type": "dir"} for b in betas], indent=2))
PY
echo "listing: $(python3 -c 'import json,sys;print(", ".join(x["name"] for x in json.load(open(sys.argv[1]))))' "$REL/index.json")"
# 3b. Web-flasher metadata (version.json + esp-web-tools manifests) — must roll
# with the release so the flasher shows the current version + notes, not a
# frozen one. Notes come from release-notes/<tag>.txt (one per line; optional).
python3 "$ROOT/scripts/build/gen-flasher-meta.py" "$TAG" "$LATEST" "$ROOT/release-notes/$TAG.txt"
# 4. Publish to the VPS (Cloudflare caches at the edge).
if [ -n "$DEST" ]; then
rsync -av "$OUT/" "$DEST:$DEST_PATH/"