build: perform validation on all base images for PRs (#1610)

This commit is contained in:
Geoff Bourne
2022-07-20 20:24:05 -05:00
committed by GitHub
parent a0a046f9f6
commit eb22d4cadc
22 changed files with 110 additions and 108 deletions

View File

@@ -235,10 +235,12 @@ function genericPacks() {
done
# recalculate the actual base directory of content
base_dir=$(find "$base_dir" -maxdepth 3 -type d \( -name mods -o -name plugins -o -name config \) -printf '%h\n' | awk '{ print length;print $0 }' | sort -n -s | cut -d" " -f2- | head -n1 | xargs echo -n)
if [[ ! $base_dir ]]; then
if ! base_dir=$(mc-image-helper find \
--max-depth=3 --type=directory --name=mods,plugins,config \
--only-shallowest --fail-no-matches --format '%h' \
"$base_dir"); then
log "ERROR: Unable to find content base of generic packs ${GENERIC_PACKS}. Directories:"
find $original_base_dir -maxdepth 3 -type d -printf ' - %P\n'
mc-image-helper find --name=* --max-depth=3 --type=directory --format '- %P' "$original_base_dir"
exit 1
fi