
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Successful in 1m28s
Build-Test-Publish / build (linux/arm64) (push) Failing after 2m28s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
24 lines
597 B
Bash
Executable File
24 lines
597 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
PROJECT="dehydrate"
|
|
|
|
echo "Cleaning ${PROJECT}..."
|
|
|
|
# Remove output directory
|
|
if [ -d "${SCRIPT_DIR}/output" ]; then
|
|
echo "Removing output directory..."
|
|
rm -rf "${SCRIPT_DIR}/output"
|
|
fi
|
|
|
|
# Remove Docker images related to this project
|
|
echo "Removing Docker images..."
|
|
docker images --filter "reference=${PROJECT}-build*" -q | xargs -r docker rmi -f
|
|
|
|
# Remove Docker build cache
|
|
echo "Pruning Docker build cache..."
|
|
docker builder prune -f
|
|
|
|
echo "✓ ${PROJECT} cleaned successfully" |