Filter destinations by service name in removal process
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user