-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add ddev switch typo3 version command
- Loading branch information
Showing
5 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
#!/bin/bash | ||
|
||
## Description: Install TYPO3 12 integration instance. | ||
## Usage: install | ||
## Example: "ddev install 12" | ||
|
||
set +x | ||
set -e | ||
|
||
. .ddev/commands/web/.utils.sh | ||
|
||
restoreComposerFiles | ||
composer install --no-progress --no-interaction | ||
|
||
vendor/bin/typo3 database:updateschema | ||
vendor/bin/typo3 cache:flush |
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,21 @@ | ||
#!/bin/bash | ||
|
||
## Description: Install TYPO3 13 integration instance. | ||
## Usage: install | ||
## Example: "ddev install 13" | ||
|
||
set +x | ||
set -e | ||
|
||
. .ddev/commands/web/.utils.sh | ||
|
||
stashComposerFiles | ||
|
||
composer remove saschaegerer/phpstan-typo3 --dev --no-interaction | ||
composer require typo3/cms-backend:'^13.4' typo3/cms-beuser:'^13.4' typo3/cms-core:'^13.4' \ | ||
typo3/cms-extbase:'^13.4' typo3/cms-frontend:'^13.4' \ | ||
--dev typo3/cms-base-distribution:'^13.4' typo3/cms-lowlevel:'^13.4' ssch/typo3-rector:'^3.0' \ | ||
--no-progress --no-interaction | ||
|
||
vendor/bin/typo3 database:updateschema | ||
vendor/bin/typo3 cache:flush |
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,47 @@ | ||
#!/bin/bash | ||
|
||
stashComposerFiles() { | ||
cp composer.json composer.json.orig | ||
} | ||
|
||
restoreComposerFiles() { | ||
local exit_status=$? | ||
if [ -f "composer.json.orig" ]; then | ||
mv composer.json.orig composer.json | ||
local message='composer.json has been restored.' | ||
if [ $exit_statusq 0 ]; then | ||
message green "${message}" | ||
else | ||
message red "${message}" | ||
fi | ||
fi | ||
} | ||
|
||
message() { | ||
local color=$1 | ||
local message=$2 | ||
|
||
case $color in | ||
red) | ||
echo "\033[31m$message\033[0m" | ||
;; | ||
green) | ||
echo "\033[32m$message\033[0m" | ||
;; | ||
yellow) | ||
echo "\033[33m$message\033[0m" | ||
;; | ||
blue) | ||
echo "\033[34m$message\033[0m" | ||
;; | ||
magenta) | ||
echo "\033[35m$message\033[0m" | ||
;; | ||
cyan) | ||
echo "\033[36m$message\033[0m" | ||
;; | ||
*) | ||
echo "$message" | ||
;; | ||
esac | ||
} |
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,14 @@ | ||
#!/bin/bash | ||
|
||
## Description: Install TYPO3 instance. | ||
## Usage: install | ||
## Example: "ddev install 12" | ||
|
||
TYPO3=${1} | ||
|
||
if [ -f ".ddev/commands/web/.install-$TYPO3" ]; then | ||
sh .ddev/commands/web/.install-$TYPO3 | ||
else | ||
echo "Error: version $TYPO3 not support." | ||
exit 1 | ||
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