Replace old local archive command

This commit is contained in:
Alex P 2023-08-25 17:19:55 +03:00
parent 8c8c4e5efe
commit 87c9beba57
No known key found for this signature in database
GPG key ID: 54487A734A204D71
2 changed files with 3 additions and 4 deletions

View file

@ -33,7 +33,8 @@ follow these steps:
1. Clone the repository and `cd` into it. 1. Clone the repository and `cd` into it.
2. Make sure you have the version in the plugin root file updated. 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. 3. Update the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant.
4. The following command should get you a ZIP file ready to be used on a WordPress site: 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:
``` ```
$ yarn run build $ yarn run build

View file

@ -62,9 +62,7 @@
"prebuild": "rm -rf ./vendor && find . -name 'node_modules' -type d -maxdepth 3 -exec rm -rf {} +", "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", "build": "composer install --no-dev && yarn install && yarn run archive",
"prearchive": "rm -rf $npm_package_name.zip", "prearchive": "rm -rf $npm_package_name.zip",
"archive": "zip -r $npm_package_name.zip . -x **.git/\\* **node_modules/\\*", "archive": "wp dist-archive . ./$npm_package_name.zip --plugin-dirname=$npm_package_name"
"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": { "config": {
"wp_org_slug": "woocommerce-paypal-payments" "wp_org_slug": "woocommerce-paypal-payments"