Skip to content

Commit

Permalink
fix: build --clean
Browse files Browse the repository at this point in the history
  • Loading branch information
elibroftw committed Apr 12, 2024
1 parent d7e5114 commit 98a42b7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ def upgrade_yt_dlp():
help='if running in a CI do not prompt just fail',
)
args = parser.parse_args()

if args.clean:
shutil.rmtree(DIST_DIR, True)
shutil.rmtree('build', True)
for file in glob.iglob('*.log'):
os.remove(file)
sys.exit()

if args.deps:
print('Building Music Caster (only install dependencies)')
else:
Expand Down Expand Up @@ -446,13 +454,6 @@ def upgrade_yt_dlp():
print(f'Removing {dist_file}')
os.remove(dist_file)

if args.clean:
shutil.rmtree(DIST_DIR, True)
shutil.rmtree('build', True)
for file in glob.iglob('*.log'):
os.remove(file)
sys.exit()

if not args.skip_build:
print(f'building executables with debug={args.debug}')
additional_args = '--log=DEBUG' if args.debug else ''
Expand Down

0 comments on commit 98a42b7

Please sign in to comment.