You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Make makerst.py create folders automatically, print a message when done
(cherry picked from commit f05aa9cc01)
This commit is contained in:
committed by
Rémi Verschelde
parent
5774098a91
commit
bcfa5beb8d
@@ -350,6 +350,9 @@ def main(): # type: () -> None
|
|||||||
|
|
||||||
pattern = re.compile(args.filter)
|
pattern = re.compile(args.filter)
|
||||||
|
|
||||||
|
# Create the output folder recursively if it doesn't already exist.
|
||||||
|
os.makedirs(args.output, exist_ok=True)
|
||||||
|
|
||||||
for class_name, class_def in state.classes.items():
|
for class_name, class_def in state.classes.items():
|
||||||
if args.filter and not pattern.search(class_def.filepath):
|
if args.filter and not pattern.search(class_def.filepath):
|
||||||
continue
|
continue
|
||||||
@@ -358,6 +361,8 @@ def main(): # type: () -> None
|
|||||||
|
|
||||||
if not state.errored:
|
if not state.errored:
|
||||||
print("No errors found.")
|
print("No errors found.")
|
||||||
|
if not args.dry_run:
|
||||||
|
print("Wrote reStructuredText files for each class to: %s" % args.output)
|
||||||
else:
|
else:
|
||||||
print("Errors were found in the class reference XML. Please check the messages above.")
|
print("Errors were found in the class reference XML. Please check the messages above.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user