You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have a custom .sh file because in our setup shopware-cli does't seem to work and we can't use shopware-cli extension admin-watch.
This results in a unusable admin watcher for large projects.
So we came up with this:
#!/bin/bash
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
set -euo pipefail
# We need to have the original plugin.json, so dump it and filter it afterwards
BIN_TOOL="${CWD}/console"
"${BIN_TOOL}" bundle:dump
# Extract the plugin name from the parameters
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--plugin)
plugin="$2"
shift # past argument
shift # past value
;;
*) # unknown option
shift # past argument
;;
esac
done
# Define the list of keys to keep
keys_to_keep=('Framework' 'System' 'Content' 'Checkout' 'Profiling' 'Administration' 'Storefront' 'Maintenance' $plugin)
# Read the JSON file and filter it with jq
filtered_json=$(jq -c 'with_entries(select(.key as $k | ["Framework", "System", "Content", "Checkout", "Profiling", "Administration", "Storefront", "Maintenance", "'$plugin'"] | index($k)))' var/plugins.json)
# Overwrite the original file with the filtered JSON
echo $filtered_json > var/plugins.json
# Run the watcher without dumping the bundles again, so we only use our own plugins
APP_ENV=prod SHOPWARE_SKIP_BUNDLE_DUMP=1 bin/watch-administration.sh
This makes something like this (bin/watch-administration.sh):
Into this (bin/watch-admin-plugin.sh --plugin AdyenPaymentShopware6):
Just for discussion, perhaps there are downsides. I don't know :)
The text was updated successfully, but these errors were encountered:
Currently we have a custom .sh file because in our setup shopware-cli does't seem to work and we can't use shopware-cli extension admin-watch.
This results in a unusable admin watcher for large projects.
So we came up with this:
This makes something like this (
bin/watch-administration.sh
):Into this (
bin/watch-admin-plugin.sh --plugin AdyenPaymentShopware6
):Just for discussion, perhaps there are downsides. I don't know :)
The text was updated successfully, but these errors were encountered: