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:
parent
7aa459fd84
commit
032a7be469
|
@ -19,7 +19,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
|
||||||
|
|
||||||
echo "Generating zip file..."
|
echo "Generating zip file..."
|
||||||
cd "$BUILD_PATH" || exit
|
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
|
cd "$PROJECT_PATH" || exit
|
||||||
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Minor tooling tweaks (zip compression level, composer invocation)
|
|
@ -44,11 +44,11 @@
|
||||||
"build:project": "pnpm --if-present '/^build:project:.*$/'",
|
"build:project": "pnpm --if-present '/^build:project:.*$/'",
|
||||||
"build:project:wp-scripts": "wireit",
|
"build:project:wp-scripts": "wireit",
|
||||||
"build:zip": "./bin/build-zip.sh",
|
"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-engines": "wp-scripts check-engines",
|
||||||
"check-licenses": "wp-scripts check-licenses",
|
"check-licenses": "wp-scripts check-licenses",
|
||||||
"format:js": "wp-scripts format-js",
|
"format:js": "wp-scripts format-js",
|
||||||
"postinstall": "composer install",
|
"postinstall": "XDEBUG_MODE=off composer install --quiet",
|
||||||
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
|
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
|
||||||
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
|
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
|
||||||
"lint:fix:lang:css": "wp-scripts lint-style --fix",
|
"lint:fix:lang:css": "wp-scripts lint-style --fix",
|
||||||
|
|
|
@ -19,7 +19,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
|
||||||
|
|
||||||
echo "Generating zip file..."
|
echo "Generating zip file..."
|
||||||
cd "$BUILD_PATH" || exit
|
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
|
cd "$PROJECT_PATH" || exit
|
||||||
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Minor tooling tweaks (zip compression level, composer invocation)
|
|
@ -67,11 +67,11 @@
|
||||||
"build:admin": "wp-scripts build",
|
"build:admin": "wp-scripts build",
|
||||||
"build:dev": "pnpm lint:js && pnpm build",
|
"build:dev": "pnpm lint:js && pnpm build",
|
||||||
"build:zip": "./bin/build-zip.sh",
|
"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-engines": "wp-scripts check-engines",
|
||||||
"check-licenses": "wp-scripts check-licenses",
|
"check-licenses": "wp-scripts check-licenses",
|
||||||
"format:js": "wp-scripts format-js",
|
"format:js": "wp-scripts format-js",
|
||||||
"postinstall": "composer install",
|
"postinstall": "XDEBUG_MODE=off composer install --quiet",
|
||||||
"lint:css": "wp-scripts lint-style",
|
"lint:css": "wp-scripts lint-style",
|
||||||
"lint:css:fix": "wp-scripts lint-style --fix",
|
"lint:css:fix": "wp-scripts lint-style --fix",
|
||||||
"lint:js": "wp-scripts lint-js",
|
"lint:js": "wp-scripts lint-js",
|
||||||
|
|
|
@ -4,6 +4,7 @@ PLUGIN_SLUG="woocommerce"
|
||||||
PROJECT_PATH=$(pwd)
|
PROJECT_PATH=$(pwd)
|
||||||
BUILD_PATH="${PROJECT_PATH}/build"
|
BUILD_PATH="${PROJECT_PATH}/build"
|
||||||
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG"
|
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG"
|
||||||
|
XDEBUG_MODE=off
|
||||||
|
|
||||||
echo "Generating build directory..."
|
echo "Generating build directory..."
|
||||||
rm -rf "$BUILD_PATH"
|
rm -rf "$BUILD_PATH"
|
||||||
|
@ -21,7 +22,7 @@ if [ -z "${NODE_ENV}" ]; then
|
||||||
fi
|
fi
|
||||||
pnpm --filter='@woocommerce/plugin-woocommerce' build || exit "$?"
|
pnpm --filter='@woocommerce/plugin-woocommerce' build || exit "$?"
|
||||||
echo "Cleaning up PHP dependencies..."
|
echo "Cleaning up PHP dependencies..."
|
||||||
composer install --no-dev || exit "$?"
|
composer install --no-dev --quiet --optimize-autoloader || exit "$?"
|
||||||
echo "Run makepot..."
|
echo "Run makepot..."
|
||||||
pnpm --filter=@woocommerce/plugin-woocommerce makepot || exit "$?"
|
pnpm --filter=@woocommerce/plugin-woocommerce makepot || exit "$?"
|
||||||
echo "Syncing files..."
|
echo "Syncing files..."
|
||||||
|
@ -29,7 +30,7 @@ rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PAT
|
||||||
|
|
||||||
echo "Generating zip file..."
|
echo "Generating zip file..."
|
||||||
cd "$BUILD_PATH" || exit
|
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
|
cd "$PROJECT_PATH" || exit
|
||||||
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Minor tooling tweaks (zip compression level, composer invocation)
|
|
@ -14,7 +14,7 @@
|
||||||
"build:project": "pnpm --if-present '/^build:project:.*$/'",
|
"build:project": "pnpm --if-present '/^build:project:.*$/'",
|
||||||
"build:project:copy-assets": "wireit",
|
"build:project:copy-assets": "wireit",
|
||||||
"build:zip": "./bin/build-zip.sh",
|
"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:down": "pnpm exec wc-e2e docker:down",
|
||||||
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
|
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
|
||||||
"docker:up": "pnpm exec wc-e2e docker:up",
|
"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: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",
|
"env:perf": "pnpm env:dev && pnpm env:performance-init && pnpm env:perf:install-k6",
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"postinstall": "composer install",
|
"postinstall": "XDEBUG_MODE=off composer install --quiet",
|
||||||
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
|
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
|
||||||
"lint:changes:branch": "pnpm '/^lint:changes:branch:.*$/'",
|
"lint:changes:branch": "pnpm '/^lint:changes:branch:.*$/'",
|
||||||
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
|
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
|
||||||
|
|
Loading…
Reference in New Issue