fix: do not regenerate localmenus every time
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Darragh Elliott 2025-04-25 13:40:30 +01:00
parent 6431434609
commit 88eb4f3dfa

View File

@ -8,7 +8,7 @@ from pathlib import Path
import lxml.etree as etree
from build.lib.misc import get_basepath
from build.lib.misc import get_basepath, update_if_changed
logger = logging.getLogger(__name__)
@ -71,7 +71,10 @@ def _write_localmenus(
),
).text = localmenu.text
page.getroottree().write(file, xml_declaration=True, encoding="utf-8")
update_if_changed(
file,
etree.tostring(page, encoding="utf-8").decode("utf-8"),
)
def update_localmenus(languages: list[str], pool: multiprocessing.Pool) -> None: