merge.py: Use git ls-files to get list of downstream PO files

The previous method could lead to problems if a dependency installed
within venv/ shipped with its own PO files.
This commit is contained in:
Jean Abou Samra 2022-05-22 19:58:14 +02:00 committed by Julien Palard
parent 23951780c2
commit c4b77fbe1e
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
1 changed files with 2 additions and 3 deletions

View File

@ -123,9 +123,8 @@ def main():
for file in pot_path.glob("**/*.pot")
}
downstream = {
po
for po in Path(".").glob("**/*.po")
if not (po.is_relative_to(Path("locales")) or po.is_relative_to(Path(".git")))
Path(po)
for po in run("git", "ls-files", "*.po", stdout=PIPE).stdout.splitlines()
}
copy_new_files(upstream - downstream, pot_path=pot_path)
update_known_files(upstream & downstream, pot_path=pot_path)