getpkg/buildtestpublish_all.sh
Your Name 9de5a0592d
Some checks failed
Build-Test-Publish / build (push) Successful in 3s
dropshell-build / build (push) Failing after 1m13s
'Generic Commit'
2025-06-01 12:02:44 +12:00

40 lines
721 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
function buildtestpublish() {
local dir="$1"
cd "$dir"
TOOLNAME=$(basename "$dir")
echo "Building $TOOLNAME"
echo "Testing $TOOLNAME"
echo "Publishing $TOOLNAME"
echo "Done"
}
function buildtestpublish_all() {
PREVIOUS_DIR=$(pwd)
# find all subdirectories in the current directory that don't begin with a dot
find "$SCRIPT_DIR" -maxdepth 1 -type d \
-not -name ".*" \
-not -path "$SCRIPT_DIR" \
-print0 | while IFS= read -r -d '' dir; \
do
buildtestpublish "${dir}"
done
cd "$PREVIOUS_DIR"
}
buildtestpublish_all