From cfa8f1135bbedef44b8f6ef37b5910382d18523d Mon Sep 17 00:00:00 2001 From: "Alex P." Date: Mon, 2 Sep 2024 17:11:37 +0300 Subject: [PATCH] Revert "Replace old local archive command" This reverts commit 87c9beba574a7de7350ae755240bc2f8d20deffb. --- README.md | 3 +-- package.json | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e084a4474..0b5c5c3fe 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,7 @@ follow these steps: 1. Clone the repository and `cd` into it. 2. Make sure you have the version in the plugin root file updated. 3. Update the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant. -4. Install WP-CLI archive command: `wp package install wp-cli/dist-archive-command`. -5. The following command should get you a ZIP file ready to be used on a WordPress site: +4. The following command should get you a ZIP file ready to be used on a WordPress site: ``` $ yarn run build diff --git a/package.json b/package.json index cf01e8dc8..b5dec8450 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,9 @@ "prebuild": "rm -rf ./vendor && find . -name 'node_modules' -type d -maxdepth 3 -exec rm -rf {} +", "build": "composer install --no-dev && yarn install && yarn run archive", "prearchive": "rm -rf $npm_package_name.zip", - "archive": "wp dist-archive . ./$npm_package_name.zip --plugin-dirname=$npm_package_name" + "archive": "zip -r $npm_package_name.zip . -x **.git/\\* **node_modules/\\*", + "postarchive": "yarn run archive:cleanup && rm -rf $npm_package_name && unzip $npm_package_name.zip -d $npm_package_name && rm $npm_package_name.zip && zip -r $npm_package_name.zip $npm_package_name && rm -rf $npm_package_name", + "archive:cleanup": "zip -d $npm_package_name.zip .env* .ddev/\\* \\*.idea/\\* .editorconfig tests/\\* .github/\\* .psalm/\\* wordpress_org_assets/\\* \\*.DS_Store \\*README.md \\*.gitattributes \\*.gitignore \\*composer.json \\*composer.lock patchwork.json phpunit.xml.dist .phpunit.result.cache phpcs.xml* psalm*.xml* playwright.config.js wp-cli.yml \\*.babelrc \\*package.json \\*webpack.config.js \\*yarn.lock \\*.travis.yml\\" }, "config": { "wp_org_slug": "woocommerce-paypal-payments"