From a54513642c13e8389def71678805f485528ae189 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 3 Oct 2026 00:47:57 +0200 Subject: [PATCH] Fix Jenkins task validation syntax --- Jenkinsfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8dc6e0c..60d095c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,9 +36,9 @@ pipeline { exit 1 } - invalid_type=$(find "${ASSET_SOURCE_DIR}" ! -type d ! -type f -print -quit) - test -z "${invalid_type}" || { - echo "ERROR: publishable assets must be regular files: ${invalid_type}" >&2 + unexpected_type=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 ! -type f -print -quit) + test -z "${unexpected_type}" || { + echo "ERROR: publishable assets must be regular files: ${unexpected_type}" >&2 exit 1 } @@ -52,10 +52,9 @@ pipeline { task_count=$((task_count + 1)) done - unexpected=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 \ - \( ! -type f -o ! -name '*.task.md' \) -print -quit) - test -z "${unexpected}" || { - echo "ERROR: unexpected file in ${ASSET_SOURCE_DIR}: ${unexpected}" >&2 + unexpected_name=$(find "${ASSET_SOURCE_DIR}" -mindepth 1 -type f ! -name '*.task.md' -print -quit) + test -z "${unexpected_name}" || { + echo "ERROR: unexpected file in ${ASSET_SOURCE_DIR}: ${unexpected_name}" >&2 exit 1 }