| '--build-only', | '--build-only', | ||||
| action='store_true', | action='store_true', | ||||
| help='Only build the `dds` executable. Skip second-phase and tests.') | help='Only build the `dds` executable. Skip second-phase and tests.') | ||||
| parser.add_argument( | |||||
| '--no-clean', | |||||
| action='store_false', | |||||
| dest='clean', | |||||
| help='Don\'t remove prior build/deps results', | |||||
| ) | |||||
| args = parser.parse_args(argv) | args = parser.parse_args(argv) | ||||
| opts = CIOptions(toolchain=args.toolchain) | opts = CIOptions(toolchain=args.toolchain) | ||||
| assert False, 'impossible' | assert False, 'impossible' | ||||
| old_cat_path = paths.PREBUILT_DIR / 'catalog.db' | old_cat_path = paths.PREBUILT_DIR / 'catalog.db' | ||||
| if old_cat_path.is_file(): | |||||
| if old_cat_path.is_file() and args.clean: | |||||
| old_cat_path.unlink() | old_cat_path.unlink() | ||||
| ci_repo_dir = paths.PREBUILT_DIR / 'ci-repo' | ci_repo_dir = paths.PREBUILT_DIR / 'ci-repo' | ||||
| if ci_repo_dir.exists(): | |||||
| if ci_repo_dir.exists() and args.clean: | |||||
| shutil.rmtree(ci_repo_dir) | shutil.rmtree(ci_repo_dir) | ||||
| self_build( | self_build( |