fix(ci): support HTML comment VERSION format, add en-GB/en-US check
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Blocked by required conditions
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Blocked by required conditions
Joomla: Extension CI / PHPStan Analysis (pull_request) Blocked by required conditions
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 3s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 6s
Universal: Auto Version Bump / Version Bump (push) Successful in 7s
Universal: Security Audit / Dependency Audit (pull_request) Successful in 4s
Joomla: Extension CI / Lint & Validate (pull_request) Successful in 8s
Universal: PR Check / Validate PR (pull_request) Successful in 6s

- Release readiness: support <!-- VERSION: XX.YY.ZZ --> format in
  README.md (not just FILE INFORMATION block format)
- Add language directory check: verify en-GB and en-US exist in all
  language/ directories under src/ or htdocs/

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-30 21:49:52 -05:00
parent 2dcc6860c2
commit d001ef7c35
+33 -2
View File
@@ -202,6 +202,37 @@ jobs:
echo "**Language file check passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: Check en-GB and en-US language directories exist
run: |
echo "### Language Directory Check" >> $GITHUB_STEP_SUMMARY
ERRORS=0
for DIR in src/ htdocs/; do
[ -d "$DIR" ] || continue
# Find all language directories
while IFS= read -r -d '' LANG_DIR; do
HAS_GB=false
HAS_US=false
[ -d "${LANG_DIR}/en-GB" ] && HAS_GB=true
[ -d "${LANG_DIR}/en-US" ] && HAS_US=true
if [ "$HAS_GB" = false ]; then
echo "Missing \`en-GB\` in: \`${LANG_DIR}\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
if [ "$HAS_US" = false ]; then
echo "Missing \`en-US\` in: \`${LANG_DIR}\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done < <(find "$DIR" -type d -name "language" -print0)
done
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} missing language director(ies).**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "All language directories have en-GB and en-US." >> $GITHUB_STEP_SUMMARY
fi
- name: Check index.html files in directories
run: |
echo "### Index.html Check" >> $GITHUB_STEP_SUMMARY
@@ -245,8 +276,8 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
ERRORS=0
# Extract version from README.md
README_VERSION=$(grep -oP '^\s*VERSION:\s*\K[0-9]{2}\.[0-9]{2}\.[0-9]{2}' README.md | head -1)
# Extract version from README.md (supports both FILE INFORMATION block and HTML comment format)
README_VERSION=$(grep -oP 'VERSION:\s*\K[0-9]{2}\.[0-9]{2}\.[0-9]{2}' README.md | head -1)
if [ -z "$README_VERSION" ]; then
echo "No VERSION found in README.md FILE INFORMATION block." >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))