⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
shopware
/
bin
/
View File Name :
build-administration.sh
#!/usr/bin/env bash CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" set -euo pipefail export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" ADMIN_ROOT="${ADMIN_ROOT:-"${PROJECT_ROOT}/vendor/shopware/administration"}" BIN_TOOL="${CWD}/console" if [[ ${CI-""} ]]; then BIN_TOOL="${CWD}/ci" if [[ ! -x "$BIN_TOOL" ]]; then chmod +x "$BIN_TOOL" fi fi # build admin [[ ${SHOPWARE_SKIP_BUNDLE_DUMP-""} ]] || "${BIN_TOOL}" bundle:dump if [[ $(command -v jq) ]]; then OLDPWD=$(pwd) cd "$PROJECT_ROOT" || exit jq -c '.[]' "var/plugins.json" | while read -r config; do srcPath=$(echo "$config" | jq -r '(.basePath + .administration.path)') # the package.json files are always one upper path=$(dirname "$srcPath") name=$(echo "$config" | jq -r '.technicalName' ) if [[ -f "$path/package.json" && ! -d "$path/node_modules" && $name != "administration" ]]; then echo "=> Installing npm dependencies for ${name}" if [[ -f "$path/package-lock.json" ]]; then npm clean-install --prefix "$path" else npm install --prefix "$path" fi fi done cd "$OLDPWD" || exit else echo "Cannot check extensions for required npm installations as jq is not installed" fi (cd "${ADMIN_ROOT}"/Resources/app/administration && npm clean-install && npm run build) [[ ${SHOPWARE_SKIP_ASSET_COPY-""} ]] ||"${BIN_TOOL}" assets:install