From 83575c3d0e8f4e0451a762a7858fd18ac949ba70 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Thu, 10 Sep 2020 10:48:09 +0300 Subject: [PATCH] Make building and packaging different processes for clarity --- README.md | 13 +++++++++++++ gruntfile.js | 4 ++-- package.json | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3efb0b774..74e0554f5 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,19 @@ Contact us [https://cloudinary.com/contact](https://cloudinary.com/contact) Stay tuned for updates, tips and tutorials: [Blog](https://cloudinary.com/blog), [Twitter](https://twitter.com/cloudinary), [Facebook](https://www.facebook.com/Cloudinary). +## Development + +### Create a Plugin Release Package + +Run `npm run package` to create the plugin release in the `/build` directory and package it as `cloudinary-image-management-and-manipulation-in-the-cloud-cdn.zip` in the root directory. + +### Deployment to WordPress.org + +1. Tag a release from the `master` branch on GitHub. + +2. Run `npm run deploy` to deploy the version referenced in the `cloudinary.php` file of the current branch. + +3. Run `npm run deploy-assets` to deploy just the WP.org plugin assets such as screenshots, icons and banners. ## License ####################################################################### diff --git a/gruntfile.js b/gruntfile.js index 5b5f006e3..c3de3c009 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -59,7 +59,7 @@ module.exports = function( grunt ) { } ); grunt.registerTask( - 'build', [ + 'package', [ 'clean', 'copy', 'compress', @@ -68,7 +68,7 @@ module.exports = function( grunt ) { grunt.registerTask( 'deploy', [ - 'build', + 'package', 'wp_deploy', ] ); diff --git a/package.json b/package.json index c882f98ed..2e1e7d555 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "dev": "cross-env webpack --mode=development --watch", "build": "cross-env webpack --mode=production", + "package": "npm run build && grunt package", "deploy": "npm run build && grunt deploy", "deploy-assets": "grunt deploy-assets" },