From 500c77a38e7d3401f4edc450e0418bca65b85a56 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Fri, 10 Oct 2014 13:51:44 -0700 Subject: [PATCH] Clean out _output directory from within docker. This is necessary as some files might be owned by root. --- build/common.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/build/common.sh b/build/common.sh index caf92cdfef3..f3cf1ad4d53 100644 --- a/build/common.sh +++ b/build/common.sh @@ -149,16 +149,14 @@ function kube::build::is_osx() { function kube::build::clean_output() { # Clean out the output directory if it exists. - if kube::build::is_osx ; then - if kube::build::build_image_built ; then - echo "+++ Cleaning out boot2docker _output/" - kube::build::run_build_command rm -rf "${REMOTE_OUTPUT_ROOT}" || true - else - echo "!!! Build image not built. Assuming boot2docker _output is clean." - fi + if kube::build::build_image_built ; then + echo "+++ Cleaning out _output/ via docker build image" + kube::build::run_build_command rm -rf '${REMOTE_OUTPUT_ROOT}/*' + else + echo "!!! Build image not built. Cannot clean via docker build image." fi - echo "+++ Cleaning out _output directory" + echo "+++ Cleaning out local _output directory" rm -rf "${LOCAL_OUTPUT_ROOT}" }