Monorepo: minor tooling tweaks (zip compression level, composer invocations) (#48857)

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: better zip compression and faster build times

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: pnpm related tweaks

* Tooling: pnpm related tweaks

* Tooling: composer related tweaks

* Tooling: revert unnecessary change.

* Tooling: revert unnecessary change.

* Tooling: cleanup.

* Tooling: cleanup.

* Tooling: cleanup.

* Tooling: added a changelog entries.

* Tooling: cleanup.
This commit is contained in:
Vladimir Reznichenko 2024-06-28 11:54:05 +02:00 committed by GitHub
parent 7aa459fd84
commit 032a7be469
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 23 additions and 10 deletions

View File

@ -19,7 +19,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
zip -q -r -9 "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
cd "$PROJECT_PATH" || exit
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Minor tooling tweaks (zip compression level, composer invocation)

View File

@ -44,11 +44,11 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:wp-scripts": "wireit",
"build:zip": "./bin/build-zip.sh",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format:js": "wp-scripts format-js",
"postinstall": "composer install",
"postinstall": "XDEBUG_MODE=off composer install --quiet",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:css": "wp-scripts lint-style --fix",

View File

@ -19,7 +19,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
zip -q -r -9 "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
cd "$PROJECT_PATH" || exit
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Minor tooling tweaks (zip compression level, composer invocation)

View File

@ -67,11 +67,11 @@
"build:admin": "wp-scripts build",
"build:dev": "pnpm lint:js && pnpm build",
"build:zip": "./bin/build-zip.sh",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format:js": "wp-scripts format-js",
"postinstall": "composer install",
"postinstall": "XDEBUG_MODE=off composer install --quiet",
"lint:css": "wp-scripts lint-style",
"lint:css:fix": "wp-scripts lint-style --fix",
"lint:js": "wp-scripts lint-js",

View File

@ -4,6 +4,7 @@ PLUGIN_SLUG="woocommerce"
PROJECT_PATH=$(pwd)
BUILD_PATH="${PROJECT_PATH}/build"
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG"
XDEBUG_MODE=off
echo "Generating build directory..."
rm -rf "$BUILD_PATH"
@ -21,7 +22,7 @@ if [ -z "${NODE_ENV}" ]; then
fi
pnpm --filter='@woocommerce/plugin-woocommerce' build || exit "$?"
echo "Cleaning up PHP dependencies..."
composer install --no-dev || exit "$?"
composer install --no-dev --quiet --optimize-autoloader || exit "$?"
echo "Run makepot..."
pnpm --filter=@woocommerce/plugin-woocommerce makepot || exit "$?"
echo "Syncing files..."
@ -29,7 +30,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
zip -q -r -9 "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
cd "$PROJECT_PATH" || exit
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Minor tooling tweaks (zip compression level, composer invocation)

View File

@ -14,7 +14,7 @@
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:copy-assets": "wireit",
"build:zip": "./bin/build-zip.sh",
"changelog": "composer install && composer exec -- changelogger",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"docker:down": "pnpm exec wc-e2e docker:down",
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
"docker:up": "pnpm exec wc-e2e docker:up",
@ -33,7 +33,7 @@
"env:perf:install-k6": "curl https://github.com/grafana/k6/releases/download/v0.33.0/k6-v0.33.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1",
"env:perf": "pnpm env:dev && pnpm env:performance-init && pnpm env:perf:install-k6",
"preinstall": "npx only-allow pnpm",
"postinstall": "composer install",
"postinstall": "XDEBUG_MODE=off composer install --quiet",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:changes:branch": "pnpm '/^lint:changes:branch:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",