Filter destinations by service name in removal process
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
gyurix
2025-05-15 13:28:27 +02:00
parent a9ba3698bd
commit 43fcc62014

View File

@@ -181,7 +181,7 @@ remove_additionals() {
DESTINATIONS=""
VOLUMES=""
DESTINATIONS=$(cat $SERVICE_DIR/service-$NAME.json | jq -r '[.containers[] | select(has("VOLUMES")) | .VOLUMES[] | select(.SHARED != "true") | .DEST] | unique[]')
for DESTINATION in $(echo $DESTINATIONS); do
for DESTINATION in $(echo $DESTINATIONS | grep $NAME); do
if [ -d "$DESTINATION" ] || [ -f "$DESTINATION" ]; then
rm -rf $DESTINATION
debug "deleted directory or file: $DESTINATION"