Modify clean.sh
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

This commit is contained in:
Your Name
2025-06-29 20:31:18 +12:00
parent 3f68f44e3d
commit 9a24576e37
5 changed files with 136 additions and 0 deletions

24
getpkg/clean.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PROJECT="getpkg"
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"