From 7cd691d86b8ae55448ca85f417f7e630e15f1a8a Mon Sep 17 00:00:00 2001
From: Benjamin Franzke <ben@bnf.dev>
Date: Wed, 30 Aug 2023 21:59:09 +0200
Subject: [PATCH] [TASK] Add CI check for zero stray or non updated JavaScript
 files

All in-tree .js files have been migrated to TypeScript, so it's
time to add a CI check to ensure no stray build files (see #101786)
or non-updated JavaScript files (e.g. #101784, #101785, #101787)
are present in the git tree.

Resolves: #101783
Related: #101784
Related: #101785
Related: #101786
Related: #101787
Releases: main, 12.4
Change-Id: I02aeaaeaae7fa0df634f39cb151f4316240936ab
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80869
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
---
 Build/Scripts/runTests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh
index 35104cb87447..00c53660b149 100755
--- a/Build/Scripts/runTests.sh
+++ b/Build/Scripts/runTests.sh
@@ -702,7 +702,7 @@ case ${TEST_SUITE} in
         SUITE_EXIT_CODE=$?
         ;;
     checkGruntClean)
-        COMMAND="cd Build; npm ci || exit 1; node_modules/grunt/bin/grunt build; cd ..; git add *; git status; git status | grep -q \"nothing to commit, working tree clean\""
+        COMMAND="find 'typo3/sysext' -name '*.js' -not -path '*/Fixtures/*' -exec rm '{}' + && cd Build; npm ci || exit 1; node_modules/grunt/bin/grunt build; cd ..; git add *; git status; git status | grep -q \"nothing to commit, working tree clean\""
         ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name check-grunt-clean-${SUFFIX} -e HOME=${CORE_ROOT}/.cache ${IMAGE_NODEJS} /bin/sh -c "${COMMAND}"
         SUITE_EXIT_CODE=$?
         ;;
-- 
GitLab