-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor development commands and testing stack. Change docs.
- Loading branch information
1 parent
0aa2c9d
commit b904722
Showing
63 changed files
with
427 additions
and
510 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/bash | ||
|
||
## Description: Run matrix tests from TYPO3_VERSIONS, PHP_VERSIONS, composer "lowest/highest". | ||
## Usage: "ci" | ||
## Example: "ddev ci" or "ddev ci all" or "ddev ci 12 8.3 lowest" | ||
|
||
set -e | ||
|
||
source .ddev/test/utils.sh | ||
export_ddev_env_vars | ||
|
||
ci_single() { | ||
TYPO3=$1 | ||
PHP=$2 | ||
COMPOSER=${3:-highest} | ||
|
||
if [ -z "$TYPO3" ]; then | ||
TYPO3=$(get_lowest_supported_typo3_versions) | ||
else | ||
if ! check_typo3_version "$TYPO3"; then | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if [ -z "$PHP" ]; then | ||
PHP=$(get_lowest_supported_php_versions_for_typo3 "$TYPO3") | ||
else | ||
if ! check_php_version_for_typo3 "$TYPO3" "$PHP"; then | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if [[ "$COMPOSER" != "lowest" && "$COMPOSER" != "highest" ]]; then | ||
echo_red "Invalid third argument. COMPOSER value can only be 'lowest' or 'highest'." | ||
exit 1 | ||
fi | ||
|
||
echo_magenta "-------------------------------------------------" | ||
echo_magenta "| TYPO3 \t| PHP\t\t| Composer\t|" | ||
echo_magenta "-------------------------------------------------" | ||
echo_magenta "| $TYPO3\t\t| $PHP\t\t| $COMPOSER\t|" | ||
echo_magenta "-------------------------------------------------" | ||
echo_magenta "" | ||
|
||
ddev config --php-version="$PHP" | ||
ddev restart | ||
if [ "$COMPOSER" == "lowest" ]; then | ||
ddev exec composer update --prefer-lowest --prefer-stable | ||
else | ||
ddev exec composer update | ||
fi | ||
ddev composer normalize | ||
ddev install "$TYPO3" | ||
ddev composer ci | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
ddev composer ci | ||
ddev docs ci | ||
exit 0 | ||
fi | ||
|
||
TYPO3=${1} | ||
|
||
if [ "$TYPO3" == "all" ]; then | ||
COMPOSER_INSTALLS=("lowest" "highest") | ||
|
||
TYPO3_VERSIONS_ARRAY=() | ||
while IFS= read -r line; do | ||
TYPO3_VERSIONS_ARRAY+=("$line") | ||
done < <(get_supported_typo3_versions) | ||
|
||
for TYPO3 in "${TYPO3_VERSIONS_ARRAY[@]}"; do | ||
PHP_VERSIONS=() | ||
while IFS= read -r line; do | ||
PHP_VERSIONS+=("$line") | ||
done < <(get_supported_php_versions_for_typo3 "$TYPO3") | ||
for PHP in "${PHP_VERSIONS[@]}"; do | ||
for COMPOSER in "${COMPOSER_INSTALLS[@]}"; do | ||
ci_single "$TYPO3" "$PHP" "$COMPOSER" | ||
done | ||
done | ||
done | ||
ddev docs ci | ||
else | ||
PHP=${2} | ||
COMPOSER=${3} | ||
ci_single "$TYPO3" "$PHP" "$COMPOSER" | ||
ddev docs ci | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
#!/bin/bash | ||
|
||
## Description: Build docs or open docs editing in watch mode. Mode "watch" is default. | ||
## Usage: "docs [watch|build]" | ||
## Example: "ddev docs" "ddev docs watch" "ddev docs build" | ||
## Usage: "docs [watch|build|test]" | ||
## Example: "ddev docs" "ddev docs watch" "ddev docs build" "ddev docs test" | ||
|
||
MODE=${1:-watch} | ||
|
||
if [ "$MODE" == "build" ]; then | ||
docker run --rm --pull always -v ./:/project/ ghcr.io/typo3-documentation/render-guides:latest --no-progress --config Documentation Documentation | ||
mkdir -p Documentation-GENERATED-temp | ||
docker run --rm --pull always -v ./:/project/ ghcr.io/typo3-documentation/render-guides:latest --no-progress --config Documentation | ||
elif [ "$MODE" == "watch" ]; then | ||
open http://localhost:5174/Documentation-GENERATED-temp/Index.html && docker run --rm -it --pull always -v ./Documentation:/project/Documentation -v ./Documentation-GENERATED-temp:/project/Documentation-GENERATED-temp -p 5174:5173 ghcr.io/garvinhicking/typo3-documentation-browsersync:latest | ||
mkdir -p Documentation-GENERATED-temp | ||
open http://localhost:5173/Documentation-GENERATED-temp/Index.html | ||
docker run --rm -it --pull always \ | ||
-v "./Documentation:/project/Documentation" \ | ||
-v "./Documentation-GENERATED-temp:/project/Documentation-GENERATED-temp" \ | ||
-p 5173:5173 ghcr.io/garvinhicking/typo3-documentation-browsersync:latest | ||
elif [ "$MODE" == "ci" ]; then | ||
mkdir -p Documentation-GENERATED-temp | ||
docker run --rm --pull always -v "$(pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log | ||
else | ||
echo "Invalid mode. Please use 'build' or 'watch'." | ||
echo "Invalid mode. Please use 'build', 'watch', or 'test'." | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.