Update jobs to use lf-infra-pre-build
[releng/global-jjb.git] / shell / jjb-cleanup.sh
index 9f3536a..69d1534 100644 (file)
@@ -20,7 +20,8 @@ set -e -o pipefail
 # shellcheck source="$WORKSPACE/.jjb.properties" disable=SC1091
 source "$WORKSPACE/.jjb.properties"
 if [[ -n "$JJB_VENV" && "$JJB_VENV" =~ /tmp/.* ]]; then
-    rm -r "$JJB_VENV" && echo "$JJB_VENV removed"
+    rm -rf "$JJB_VENV" && echo "$JJB_VENV removed"
     unset JJB_VENV
 fi
-rm "$WORKSPACE/.jjb.properties"
+rm -f "$WORKSPACE/.jjb.properties"
+deactivate