diff --git a/ci/build-packages.sh b/ci/build-packages.sh index 024b92a..e8ab4b4 100755 --- a/ci/build-packages.sh +++ b/ci/build-packages.sh @@ -25,15 +25,15 @@ mkdir -p releases echo "== $COMMAND" eval "$COMMAND" -# Repos drop packages in the root, build/, build_/ or releases/ depending -# on the repo, so collect from anywhere except releases/ itself. -found=0 +# Repos drop packages in the root, build/, build_/ or straight into +# releases/ depending on the repo, so gather any strays and then count what +# actually ended up in releases/. while IFS= read -r package; do [ -n "$package" ] || continue mv "$package" releases/ - found=$((found + 1)) done < <(find . -name '*.eap' -not -path './releases/*' -not -path './.git/*') +found=$(find releases -name '*.eap' | wc -l | tr -d ' ') [ "$found" -gt 0 ] || { echo "no .eap produced" >&2 exit 1