...

Text file src/github.com/datawire/ambassador/v2/.github/actions/after-job/check-clobber.sh

Documentation: github.com/datawire/ambassador/v2/.github/actions/after-job

     1#!/usr/bin/env bash
     2#shellcheck disable=SC2016
     3
     4r=0
     5if [[ -n "$(git clean --dry-run -d -x)" ]]; then
     6    echo
     7    echo 'There are files that `make clobber` did not remove that it should have:'
     8    git clean --dry-run -d -x | sed 's/^Would remove /    /'
     9    echo
    10    r=1
    11fi
    12if docker image list --format='{{ .Repository }}:{{ .Tag }}' | grep -q '\.local/'; then
    13    echo
    14    echo 'There are Docker images that `make clobber` did not remove that it should have:'
    15    docker image list | grep '\.local/'
    16    echo
    17    r=1
    18fi
    19if [[ -n "$(docker container list --all --quiet)" ]]; then
    20    echo
    21    echo 'There are Docker containers that `make clobber` did not remove:'
    22    docker container list --all
    23    echo
    24    r=1
    25fi
    26if [[ -n "$(docker volume list --quiet)" ]]; then
    27    echo
    28    echo 'There are Docker volumes that `make clobber` did not remove:'
    29    docker volume list
    30    echo
    31    r=1
    32fi
    33exit "$r"

View as plain text