Skip to content

Commit

Permalink
Merge pull request #49 from shopware/make-setup-more-verbose
Browse files Browse the repository at this point in the history
feat: make setup more verbose
  • Loading branch information
pweyck authored Jan 23, 2024
2 parents e5d2d17 + 76bea72 commit 7852cbc
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 60 deletions.
25 changes: 13 additions & 12 deletions 8.0/rootfs/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh

set -e
set -x

try=0

Expand All @@ -24,34 +25,34 @@ update_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.upgradeVersion != null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:update $plugin
php -derror_reporting=E_ALL bin/console plugin:update $plugin
done
}

install_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.installedAt == null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:install --activate $plugin
php -derror_reporting=E_ALL bin/console plugin:install --activate $plugin
done
}

if php bin/console system:config:get shopware.installed; then
php bin/console system:update:finish
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:update:finish
php -derror_reporting=E_ALL bin/console plugin:refresh

update_all_plugins
install_all_plugins
php bin/console theme:compile
php -derror_reporting=E_ALL bin/console theme:compile
else
# Shopware is not installed
php bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php bin/console theme:change --all Storefront
php bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php bin/console system:config:set core.usageData.shareUsageData false --json
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php -derror_reporting=E_ALL bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php -derror_reporting=E_ALL bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php -derror_reporting=E_ALL bin/console theme:change --all Storefront
php -derror_reporting=E_ALL bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php -derror_reporting=E_ALL bin/console system:config:set core.usageData.shareUsageData false --json
php -derror_reporting=E_ALL bin/console plugin:refresh

install_all_plugins
fi
25 changes: 13 additions & 12 deletions 8.1/rootfs/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh

set -e
set -x

try=0

Expand All @@ -24,34 +25,34 @@ update_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.upgradeVersion != null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:update $plugin
php -derror_reporting=E_ALL bin/console plugin:update $plugin
done
}

install_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.installedAt == null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:install --activate $plugin
php -derror_reporting=E_ALL bin/console plugin:install --activate $plugin
done
}

if php bin/console system:config:get shopware.installed; then
php bin/console system:update:finish
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:update:finish
php -derror_reporting=E_ALL bin/console plugin:refresh

update_all_plugins
install_all_plugins
php bin/console theme:compile
php -derror_reporting=E_ALL bin/console theme:compile
else
# Shopware is not installed
php bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php bin/console theme:change --all Storefront
php bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php bin/console system:config:set core.usageData.shareUsageData false --json
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php -derror_reporting=E_ALL bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php -derror_reporting=E_ALL bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php -derror_reporting=E_ALL bin/console theme:change --all Storefront
php -derror_reporting=E_ALL bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php -derror_reporting=E_ALL bin/console system:config:set core.usageData.shareUsageData false --json
php -derror_reporting=E_ALL bin/console plugin:refresh

install_all_plugins
fi
25 changes: 13 additions & 12 deletions 8.2/rootfs/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh

set -e
set -x

try=0

Expand All @@ -24,34 +25,34 @@ update_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.upgradeVersion != null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:update $plugin
php -derror_reporting=E_ALL bin/console plugin:update $plugin
done
}

install_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.installedAt == null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:install --activate $plugin
php -derror_reporting=E_ALL bin/console plugin:install --activate $plugin
done
}

if php bin/console system:config:get shopware.installed; then
php bin/console system:update:finish
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:update:finish
php -derror_reporting=E_ALL bin/console plugin:refresh

update_all_plugins
install_all_plugins
php bin/console theme:compile
php -derror_reporting=E_ALL bin/console theme:compile
else
# Shopware is not installed
php bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php bin/console theme:change --all Storefront
php bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php bin/console system:config:set core.usageData.shareUsageData false --json
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php -derror_reporting=E_ALL bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php -derror_reporting=E_ALL bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php -derror_reporting=E_ALL bin/console theme:change --all Storefront
php -derror_reporting=E_ALL bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php -derror_reporting=E_ALL bin/console system:config:set core.usageData.shareUsageData false --json
php -derror_reporting=E_ALL bin/console plugin:refresh

install_all_plugins
fi
25 changes: 13 additions & 12 deletions 8.3/rootfs/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh

set -e
set -x

try=0

Expand All @@ -24,34 +25,34 @@ update_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.upgradeVersion != null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:update $plugin
php -derror_reporting=E_ALL bin/console plugin:update $plugin
done
}

install_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.installedAt == null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:install --activate $plugin
php -derror_reporting=E_ALL bin/console plugin:install --activate $plugin
done
}

if php bin/console system:config:get shopware.installed; then
php bin/console system:update:finish
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:update:finish
php -derror_reporting=E_ALL bin/console plugin:refresh

update_all_plugins
install_all_plugins
php bin/console theme:compile
php -derror_reporting=E_ALL bin/console theme:compile
else
# Shopware is not installed
php bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php bin/console theme:change --all Storefront
php bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php bin/console system:config:set core.usageData.shareUsageData false --json
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php -derror_reporting=E_ALL bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php -derror_reporting=E_ALL bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php -derror_reporting=E_ALL bin/console theme:change --all Storefront
php -derror_reporting=E_ALL bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php -derror_reporting=E_ALL bin/console system:config:set core.usageData.shareUsageData false --json
php -derror_reporting=E_ALL bin/console plugin:refresh

install_all_plugins
fi
25 changes: 13 additions & 12 deletions rootfs/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env sh

set -e
set -x

try=0

Expand All @@ -24,34 +25,34 @@ update_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.upgradeVersion != null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:update $plugin
php -derror_reporting=E_ALL bin/console plugin:update $plugin
done
}

install_all_plugins() {
list_with_updates=$(php bin/console plugin:list --json | jq 'map(select(.installedAt == null)) | .[].name' -r)

for plugin in $list_with_updates; do
php bin/console plugin:install --activate $plugin
php -derror_reporting=E_ALL bin/console plugin:install --activate $plugin
done
}

if php bin/console system:config:get shopware.installed; then
php bin/console system:update:finish
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:update:finish
php -derror_reporting=E_ALL bin/console plugin:refresh

update_all_plugins
install_all_plugins
php bin/console theme:compile
php -derror_reporting=E_ALL bin/console theme:compile
else
# Shopware is not installed
php bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php bin/console theme:change --all Storefront
php bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php bin/console system:config:set core.usageData.shareUsageData false --json
php bin/console plugin:refresh
php -derror_reporting=E_ALL bin/console system:install --create-database "--shop-locale=$INSTALL_LOCALE" "--shop-currency=$INSTALL_CURRENCY" --force
php -derror_reporting=E_ALL bin/console user:create "$INSTALL_ADMIN_USERNAME" --admin --password="$INSTALL_ADMIN_PASSWORD" -n
php -derror_reporting=E_ALL bin/console sales-channel:create:storefront --name=Storefront --url="$APP_URL"
php -derror_reporting=E_ALL bin/console theme:change --all Storefront
php -derror_reporting=E_ALL bin/console system:config:set core.frw.completedAt '2019-10-07T10:46:23+00:00'
php -derror_reporting=E_ALL bin/console system:config:set core.usageData.shareUsageData false --json
php -derror_reporting=E_ALL bin/console plugin:refresh

install_all_plugins
fi

0 comments on commit 7852cbc

Please sign in to comment.