← Commit history

kicad-lane: release script reads equivalents with notes; its standard step can no longer fail a release

Colby Knox ·adc0ffaff4 ·14d ago ·parent 8bc2fcd
1 file changed +6−2
tools/build_native_release.py+6−2
@@ -247,7 +247,10 @@ def publish_zip(ver, zpath, sha, notes):     head, _, rest = prior.partition("\n\n## ")     led.write_text((head + "\n\n" + entry + ("## " + rest if rest else "")) if rest else (prior + entry), encoding="utf-8")     # 5b. The EDA Bridge Standard measures this bridge from its verb list: refresh it with every release.-    refresh_standard(ver, zpath)+    try:+        refresh_standard(ver, zpath)+    except Exception as e:  # the release has shipped; the standard can be refreshed by hand+        print(f"WARNING: refreshing the EDA Bridge Standard failed ({e!r}); push reference/kicad-{ver}.json by hand")     # 6. The page repo keeps the ledger (it was left local before). Never the public manifest here.     failed = push_chunked(REF, ["RELEASE_NOTES.md"], f"{ver}: release record", cwd=str(ROOT))     if failed:@@ -280,7 +283,8 @@ def refresh_standard(ver, zpath):     if eqf.exists():         aliases = dict(re.findall(r'\("kicad_(\w+)", "kicad_(\w+)"\)', (RUST / "crates/kicad-bridge/src/catalog.rs").read_text()))         eq = json.loads(eqf.read_text())-        named = [k for k, (v, m) in eq.items() if m == "exact" and aliases.get(k) == v.strip() and f"kicad_{k}" in verbs]+        # an entry is [verbs, match] or, with a note, [verbs, match, note]+        named = [k for k, e in eq.items() if len(e) >= 2 and e[1] == "exact" and aliases.get(k) == str(e[0]).strip() and f"kicad_{k}" in verbs]         if named:             for k in named:                 eq.pop(k)