diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29a5b21e43a..347815490da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/migrate.py b/migrate.py index ed755b510d0..28059db08d0 100644 --- a/migrate.py +++ b/migrate.py @@ -34,6 +34,7 @@ import argparse import fnmatch import os +import re from shutil import copyfile import shutil import sys @@ -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)