|
| 1 | +#!/bin/bash |
| 2 | +# Flags possible: |
| 3 | +# -e for shop edition. Possible values: CE/EE |
| 4 | + |
| 5 | +edition='EE' |
| 6 | +while getopts e: flag; do |
| 7 | + case "${flag}" in |
| 8 | + e) edition=${OPTARG} ;; |
| 9 | + *) ;; |
| 10 | + esac |
| 11 | +done |
| 12 | + |
| 13 | +SCRIPT_PATH=$(dirname ${BASH_SOURCE[0]}) |
| 14 | + |
| 15 | +cd $SCRIPT_PATH/../../ || exit |
| 16 | + |
| 17 | +# Prepare services configuration |
| 18 | +make setup |
| 19 | +make addbasicservices |
| 20 | +make file=services/adminer.yml addservice |
| 21 | +make file=services/selenium-chrome.yml addservice |
| 22 | + |
| 23 | +# Configure containers |
| 24 | +perl -pi\ |
| 25 | + -e 's#error_reporting = .*#error_reporting = E_ALL ^ E_WARNING ^ E_DEPRECATED#g;'\ |
| 26 | + containers/php/custom.ini |
| 27 | + |
| 28 | +perl -pi\ |
| 29 | + -e 's#/var/www/#/var/www/source/#g;'\ |
| 30 | + containers/httpd/project.conf |
| 31 | + |
| 32 | +perl -pi\ |
| 33 | + -e 's#PHP_VERSION=.*#PHP_VERSION=8.2#g;'\ |
| 34 | + .env |
| 35 | + |
| 36 | +mkdir source |
| 37 | +docker compose up --build -d php |
| 38 | + |
| 39 | +git clone https://github.com/OXID-eSales/graphql-base-module ./source -b b-7.3.x |
| 40 | + |
| 41 | +$SCRIPT_PATH/../parts/shared/require_shop_edition_packages.sh -e"${edition}" -v"dev-b-7.3.x" |
| 42 | +$SCRIPT_PATH/../parts/shared/require_twig_components.sh -e"${edition}" -b"b-7.3.x" |
| 43 | +$SCRIPT_PATH/../parts/shared/require.sh -n"oxid-esales/developer-tools" -v"dev-b-7.3.x" |
| 44 | +$SCRIPT_PATH/../parts/shared/require.sh -n"oxid-esales/oxideshop-doctrine-migration-wrapper" -v"dev-b-7.3.x" |
| 45 | +$SCRIPT_PATH/../parts/shared/require_theme_dev.sh -t"apex" -b"b-7.3.x" |
| 46 | + |
| 47 | +git clone https://github.com/OXID-eSales/oxapi-documentation source/documentation/oxapi-documentation |
| 48 | +make docpath=./source/documentation/oxapi-documentation addsphinxservice |
| 49 | + |
| 50 | +docker-compose exec -T -w /var/www php \ |
| 51 | + composer config allow-plugins.oxid-esales/oxideshop-composer-plugin true |
| 52 | + |
| 53 | +perl -pi -e ' |
| 54 | + BEGIN { |
| 55 | + $inserted = 0; |
| 56 | + $autoload_dev = qq( "autoload-dev": {\n "psr-4": {\n "OxidEsales\\\\EshopCommunity\\\\Tests\\\\": "./vendor/oxid-esales/oxideshop-ce/tests"\n }\n },\n); |
| 57 | + } |
| 58 | + if (!$inserted && $_ =~ /"repositories":/) { |
| 59 | + $_ = $autoload_dev . $_; |
| 60 | + $inserted = 1; |
| 61 | + } |
| 62 | +' source/composer.json |
| 63 | + |
| 64 | +make up |
| 65 | + |
| 66 | +docker compose exec php composer update --no-interaction |
| 67 | + |
| 68 | +perl -pi\ |
| 69 | + -e 'print "SetEnvIf Authorization \"(.*)\" HTTP_AUTHORIZATION=\$1\n\n" if $. == 1'\ |
| 70 | + source/source/.htaccess |
| 71 | + |
| 72 | +docker compose exec -T php vendor/bin/oe-console oe:module:install ./ |
| 73 | + |
| 74 | +$SCRIPT_PATH/../parts/shared/setup_database.sh --no-demodata |
| 75 | + |
| 76 | +docker compose exec -T php vendor/bin/oe-console oe:module:activate oe_graphql_base |
| 77 | +docker compose exec -T php vendor/bin/oe-console oe:theme:activate apex |
| 78 | + |
| 79 | +$SCRIPT_PATH/../parts/shared/create_admin.sh |
0 commit comments