Compare commits

...

2 Commits

Author SHA1 Message Date
Darragh Elliott
88eb4f3dfa fix: do not regenerate localmenus every time
All checks were successful
continuous-integration/drone/pr Build is passing
2025-04-25 13:40:30 +01:00
Darragh Elliott
6431434609 fix: match xmllist lines properly 2025-04-25 13:18:54 +01:00
2 changed files with 6 additions and 3 deletions

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:

View File

@ -127,7 +127,7 @@ def _check_xmllist_deps(file: Path) -> None:
xmls = set()
with file.open(mode="r") as fileobj:
for line in fileobj:
for newfile in Path("").glob(line + ".??.xml"):
for newfile in Path("").glob(line.strip() + ".??.xml"):
xmls.add(newfile)
touch_if_newer_dep(file, list(xmls))