CI / WordPress latest + WooCommerce latest on PHP 8.3 (pull_request) Successful in 1m18s
Compatibility / WP latest / WC latest / PHP 7.4 (pull_request) Skipped
Compatibility / WP latest / WC beta / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP nightly / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.4 (pull_request) Skipped
Compatibility / Keep the compatibility headers honest (pull_request) Skipped
CI / Static checks (pull_request) Successful in 4m38s
Takes woo-security-manager's current checker (sibling-hook boundary via FAMILY_PREFIXES, table-row scoping), keeping the floor in ci/plugin.conf. dist-files.sh now lists the same files in a git-less copy, which is what ci_php's php container is handed on the Gitea runner; before, check-docs failed there with exit 127. Co-Authored-By: Claude Code <[email protected]>
53 lines
2.1 KiB
Bash
Executable File
53 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# List the files that go into the installed plugin: everything git tracks,
|
|
# minus the patterns in .distignore.
|
|
#
|
|
# Deliberately the only answer to "what ships". The release zip and the
|
|
# hygiene checks both read it, so a file cannot be excluded from one and
|
|
# included in the other — which is the version of this bug that ends with
|
|
# internal notes readable over HTTP on a live shop.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
[ -f .distignore ] || { echo ".distignore is missing — the zip would contain git files and internal notes." >&2; exit 1; }
|
|
|
|
patterns=()
|
|
while IFS= read -r line; do
|
|
line="${line%%#*}"
|
|
line="$(printf '%s' "$line" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')"
|
|
[ -n "$line" ] && patterns+=("${line%/}")
|
|
done < .distignore
|
|
|
|
# -z, not plain `git ls-files`: git QUOTES any path containing a non-ASCII
|
|
# byte, so "TESTMILJØ.md" comes out as the literal 14-character string
|
|
# "TESTMILJ\303\230.md". That form matches no pattern in .distignore, so the
|
|
# file is kept — an internal document walking straight into the release zip
|
|
# with nothing said. (-z also covers paths with spaces.) Found in a sibling
|
|
# plugin that has exactly such a filename; this repo has none today, which is
|
|
# precisely why it would have sat here until someone added one.
|
|
# In a git-less copy (ci_php's php container, which is handed exactly the
|
|
# tracked files and has no git) the tree IS the tracked set, so walk it.
|
|
# selftest.sh asserts the two forms print the same list.
|
|
tracked() {
|
|
if [ -e .git ]; then
|
|
git ls-files -z
|
|
else
|
|
find . -type f -print0 | sed -z 's|^\./||' | LC_ALL=C sort -z
|
|
fi
|
|
}
|
|
|
|
tracked | while IFS= read -r -d '' file; do
|
|
keep=1
|
|
for p in "${patterns[@]}"; do
|
|
# A bare name excludes the file or directory wherever it appears, which is
|
|
# how .distignore is read everywhere else. Anchor with a leading / to mean
|
|
# the repo root only.
|
|
case "$p" in
|
|
/*) case "$file" in "${p#/}"|"${p#/}"/*) keep=0 ;; esac ;;
|
|
*) case "$file" in $p|$p/*|*/$p|*/$p/*) keep=0 ;; esac ;;
|
|
esac
|
|
[ "$keep" = 0 ] && break
|
|
done
|
|
[ "$keep" = 1 ] && printf '%s\n' "$file"
|
|
done
|