Skip to content

Commit

Permalink
Merge remote-tracking branch 'eap/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
NarkNiro committed May 2, 2024
2 parents 20e67e6 + 1b2bf00 commit bd95ee6
Show file tree
Hide file tree
Showing 198 changed files with 8,700 additions and 5,769 deletions.
55 changes: 55 additions & 0 deletions .ddev/commands/web/build-frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

## Description: Local TYPO3 frontend sources build
## Usage: run-frontend {install|develop|build|watchjs}
## Example: "ddev update-to develop"
## ProjectTypes: typo3

CURRENT_PACKAGE_COMMAND="npm"
FRONTEND_DIRECTORY="Build"

moveToFrontendDir() {
cd $DDEV_DOCROOT/../../$FRONTEND_DIRECTORY
echo "Move to \"${FRONTEND_DIRECTORY}\" Directory"
}

install() {
moveToFrontendDir
$CURRENT_PACKAGE_COMMAND install
}

build() {
moveToFrontendDir
$CURRENT_PACKAGE_COMMAND run build
echo "Frontend build done."
}

watchjs() {
moveToFrontendDir
$CURRENT_PACKAGE_COMMAND run watchjs
}

develop() {
moveToFrontendDir
$CURRENT_PACKAGE_COMMAND run develop
echo "Frontend build done."
}

case "$1" in
build)
build
;;
install)
install
;;
watchjs)
watchjs
;;
develop)
watchjs
;;
*)
echo "Usage: ddev run-frontend {install|develop|build|watchjs}" >&2
exit 0
;;
esac
36 changes: 30 additions & 6 deletions .ddev/commands/web/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Description: Local TYPO3 Test runner
## Usage: run-tests [flags]
## Example: "ddev run-tests"
## Flags: [{"Name":"version","Shorthand":"v","Type":"string","DefValue":"all","Usage":"Switch of TYPO3 version (9|10|11)"},{"Name":"filter","Shorthand":"f","Type":"string","DefValue":"MySpecialTest","Usage":"filter Test runnings"},{"Name":"test","Shorthand":"t","Type":"string","Usage":"Test mode (all|func|unit)","DefValue":"all","Name":"only-test","Shorthand":"o","Usage":"Flag triggers only tests without version update","NoOptDefVal":"1"}]
## Flags: [{"Name":"version","Shorthand":"v","Type":"string","DefValue":"all","Usage":"Switch of TYPO3 version (11)"},{"Name":"filter","Shorthand":"f","Type":"string","DefValue":"MySpecialTest","Usage":"filter Test runnings"},{"Name":"test","Shorthand":"t","Type":"string","Usage":"Test mode (all|func|unit)","DefValue":"all","Name":"only-test","Shorthand":"o","Usage":"Flag triggers only tests without version update","NoOptDefVal":"1"}]
## ProjectTypes: typo3

versions=(all 9 10 11)
versions=(all 12 11)
testcases=(all func unit)
selectedVersion=
testCase=all
Expand Down Expand Up @@ -62,6 +62,16 @@ run_functional() {
fi
}

run_functional10() {
fileName=".test-results/functional-${currentVersion}.txt"
echo "" >$fileName
if [ "${filter}" = "" ]; then
composer test:php:functional10 -- >>$fileName
else
composer test:php:functional10 -- --filter="$filter" $fileName
fi
}

run_unit() {
fileName=".test-results/unit-${currentVersion}.txt"
echo "" >$fileName
Expand All @@ -72,17 +82,31 @@ run_unit() {
fi
}

run_unit10() {
fileName=".test-results/unit-${currentVersion}.txt"
echo "" >$fileName
if [ "${filter}" = "" ]; then
composer test:php:unit10 >>$fileName
else
composer test:php:unit10 -- --filter="$filter" >>$fileName
fi
}

run_test() {
case $testCase in
all)
run_functional
run_unit
[[ "${currentVersion}" -eq 11 ]] && run_functional
[[ "${currentVersion}" -eq 11 ]] && run_unit
[[ "${currentVersion}" -eq 12 ]] && run_functional10
[[ "${currentVersion}" -eq 12 ]] && run_unit10
;;
unit)
run_unit
[[ "${currentVersion}" -eq 11 ]] && run_unit
[[ "${currentVersion}" -eq 12 ]] && run_unit10
;;
func)
run_functional
[[ "${currentVersion}" -eq 11 ]] && run_functional
[[ "${currentVersion}" -eq 12 ]] && run_functional10
;;
esac
}
Expand Down
4 changes: 2 additions & 2 deletions .ddev/commands/web/update-to
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

## Description: Local TYPO3 version switcher
## Usage: update-to {9|10|11}
## Example: "ddev update-to 9"
## Usage: update-to {11}
## Example: "ddev update-to 11"
## ProjectTypes: typo3

bash ./Build/Scripts/composer-for-core-version.sh $*
Loading

0 comments on commit bd95ee6

Please sign in to comment.