forked from AFPy/python-docs-fr
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:
parent
23951780c2
commit
c4b77fbe1e
5
merge.py
5
merge.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user