Skip to content

Commit

Permalink
Improve migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
adikhoff committed Oct 13, 2024
1 parent 34bd91f commit ad82e9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Migrate to Redot
run: |
python migrate.py --tiny . _migrated
python migrate.py . _migrated
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
- name: Sphinx build
Expand Down
10 changes: 9 additions & 1 deletion migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import argparse
import fnmatch
import os
import re
from shutil import copyfile
import shutil
import sys
Expand Down Expand Up @@ -335,9 +336,16 @@ def main():
print(args)

inputDir = args.input
outputDir = args.output
if (args.output != '.' and not args.output.startswith('/')):
outputDir = args.output
else:
print("output can't be . or start with /")
exit(1)
includeUnimplemented = args.extended
ignoreClasses = args.tiny

print("Deleting output dir")
shutil.rmtree(outputDir)

print("Migrating...")
migrate(inputDir, outputDir, includeUnimplemented, ignoreClasses, verbose)
Expand Down

0 comments on commit ad82e9d

Please sign in to comment.