Skip to content

Commit e89fcb6

Browse files
committed
update tools
1 parent 91e4a3c commit e89fcb6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/update_intended_for.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
from rich import print
2525

26-
VERBOSE = False
26+
VERBOSE = True
27+
DRY_RUN = False
2728

2829

2930
def root_dir():
@@ -32,7 +33,6 @@ def root_dir():
3233

3334
def main():
3435
for json_path in root_dir().glob("**/*.json"):
35-
3636
if VERBOSE:
3737
print(f"Checking {json_path.relative_to(root_dir())}")
3838

@@ -79,6 +79,11 @@ def main():
7979
if VERBOSE:
8080
print(intended_for)
8181

82+
if not DRY_RUN:
83+
with open(json_path, "w") as f:
84+
content["IntendedFor"] = intended_for
85+
json.dump(content, f, indent=4)
86+
8287

8388
if __name__ == "__main__":
8489
main()

0 commit comments

Comments
 (0)