@@ -176,10 +176,11 @@ function ionos.wordpress.build_workspace_package_docker() {
176176 pnpm --filter "$PACKAGE_NAME " --if-present run build
177177 pnpm --filter "$PACKAGE_NAME " --if-present run postbuild
178178
179+ [[ "$VERBOSE " == "yes" ]] && DOCKER_BUILD_VERBOSE='plain' || DOCKER_BUILD_VERBOSE='quiet'
179180 # image labels : see https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
180181 docker build \
181182 $(test -f $path /.env && cat $path /.env | sed 's/^/--build-arg /' ||:) \
182- --progress=plain \
183+ --progress=$DOCKER_BUILD_VERBOSE \
183184 -t $DOCKER_IMAGE_NAME :latest \
184185 -t $DOCKER_IMAGE_NAME :$PACKAGE_VERSION \
185186 --label "maintainer=$DOCKER_IMAGE_AUTHOR " \
367368 done
368369 done
369370
371+ ionos.wordpress.log_info " generate localization files with wp-cli for plugin $PLUGIN_NAME "
372+
370373 # update po files
371374 ionos.wordpress.build_workspace_package_wp_plugin.wp_cli i18n update-po $LANGUAGES_DIR /* .pot
372375
415418 <( sed -e ' /^".*$/d' -e ' s/^\(#:.*\):[0-9]\+/\1/g' $po_file ) \
416419 <( git show HEAD:$po_file 2> /dev/null | sed -e ' /^".*$/d' -e ' s/^\(#:.*\):[0-9]\+/\1/g' ) \
417420 || diff_error_code=$?
418- [[ " 0" == " $diff_error_code " ]] && git checkout $po_file
421+ [[ " 0" == " $diff_error_code " ]] && git checkout $po_file --quiet
419422 done
420423 else
421424 ionos.wordpress.log_warn " processing i18n skipped : env variable WP_CLI_I18N_LOCALES not set or not enabled by --use"
429432 if [[ " ${USE[@]} " =~ all| wp-plugin:rector| wp-plugin:bundle ]]; then
430433 # copy plugin code to dist/[plugin-name]
431434 mkdir -p $path /dist/$plugin_name -$PACKAGE_VERSION
432- rsync -rupE --verbose \
435+ ionos.wordpress.log_info " syncing plugin files to $path /dist/$plugin_name -$PACKAGE_VERSION "
436+ [[ " $VERBOSE " == " yes" ]] && RSYNC_VERBOSE=' --verbose' || RSYNC_VERBOSE=' --quiet'
437+ rsync -rupE $RSYNC_VERBOSE \
433438 --exclude=node_modules/ \
434439 --exclude=package.json \
435440 --exclude=dist/ \
@@ -449,21 +454,23 @@ EOF
449454 $( test -f $path /.distignore && echo " --exclude-from=$path /.distignore" ) \
450455 $path / \
451456 $path /dist/$plugin_name -$PACKAGE_VERSION
457+ ionos.wordpress.log_info " syncing plugin files done"
452458 fi
453459
454460 if [[ " ${USE[@]} " =~ all| wp-plugin:rector ]]; then
455461 (
456462 # we wrap the loop in a subshell call because of the nullglob shell behaviour change
457463 # nullglob is needed because we want to skip the loop if no rector-config-php*.php files are found
458464 shopt -s nullglob
459-
465+ ionos.wordpress.log_info " running rector for plugin $plugin_name "
466+ [[ " $VERBOSE " == " yes" ]] && RECTOR_VERBOSE=' ' || RECTOR_VERBOSE=' --no-diffs'
460467 # process plugin using rector
461468 for RECTOR_CONFIG in ./packages/docker/rector-php/rector-config-php* .php; do
462469 RECTOR_CONFIG=$( basename " $RECTOR_CONFIG " ' .php' )
463470 TARGET_PHP_VERSION=" ${RECTOR_CONFIG#* rector-config-php} "
464471 TARGET_DIR=" dist/${plugin_name} -${PACKAGE_VERSION} -php${TARGET_PHP_VERSION} /${plugin_name} "
465472 mkdir -p $path /$TARGET_DIR
466- rsync -a $path /dist/${plugin_name} -$PACKAGE_VERSION / $path /$TARGET_DIR
473+ rsync -a --quiet $path /dist/${plugin_name} -$PACKAGE_VERSION / $path /$TARGET_DIR
467474 # call dockerized rector
468475 docker run \
469476 $DOCKER_FLAGS \
475482 --clear-cache \
476483 --config " ${RECTOR_CONFIG} .php" \
477484 --no-progress-bar \
485+ ${RECTOR_VERBOSE} \
478486 process \
479487 dist
480488
499507 done
500508 cat << EOF | tee $path /build-info
501509$( cd $path /dist && ls -1shS * .zip 2> /dev/null || echo " no zip archives found" )
502-
503- $( echo -n " ---" )
504-
505- $( for ZIP_ARCHIVE in $( find $path /dist/ -name ' *.zip' ) ; do (cd $( dirname $ZIP_ARCHIVE ) && unzip -l $( basename $ZIP_ARCHIVE ) && echo " " ); done)
510+ $( if [[ " $VERBOSE " == " yes" ]]; then
511+ for ZIP_ARCHIVE in $( find $path /dist/ -name ' *.zip' ) ; do (cd $( dirname $ZIP_ARCHIVE ) && unzip -l $( basename $ZIP_ARCHIVE ) && echo " " ); done
512+ fi)
506513EOF
507514 fi
508515
0 commit comments