Skip to content

Commit

Permalink
Merge pull request #901 from inclement/improve_clean_recipe_build
Browse files Browse the repository at this point in the history
Made clean-recipe-build delete dists
  • Loading branch information
inclement authored Oct 9, 2016
2 parents b0a8eaa + 95dddf7 commit 8999527
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,14 @@ def add_parser(subparsers, *args, **kwargs):

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

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

def clean_download_cache(self, args):
'''
Expand Down

0 comments on commit 8999527

Please sign in to comment.