Skip to content

Commit 95dddf7

Browse files
committed
Made clean-recipe-build delete dists
1 parent 9f02aa4 commit 95dddf7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pythonforandroid/toolchain.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,14 @@ def add_parser(subparsers, *args, **kwargs):
369369

370370
parser_clean_recipe_build = add_parser(subparsers,
371371
'clean_recipe_build', aliases=['clean-recipe-build'],
372-
help='Delete the build info for the given recipe',
372+
help=('Delete the build components of the given recipe. '
373+
'By default this will also delete built dists'),
373374
parents=[generic_parser])
374375
parser_clean_recipe_build.add_argument('recipe', help='The recipe name')
376+
parser_clean_recipe_build.add_argument('--no-clean-dists', default=False,
377+
dest='no_clean_dists',
378+
action='store_true',
379+
help='If passed, do not delete existing dists')
375380

376381
parser_clean_download_cache= add_parser(subparsers,
377382
'clean_download_cache', aliases=['clean-download-cache'],
@@ -592,6 +597,8 @@ def clean_recipe_build(self, args):
592597
recipe = Recipe.get_recipe(args.recipe, self.ctx)
593598
info('Cleaning build for {} recipe.'.format(recipe.name))
594599
recipe.clean_build()
600+
if not args.no_clean_dists:
601+
self.clean_dists(args)
595602

596603
def clean_download_cache(self, args):
597604
'''

0 commit comments

Comments
 (0)