1. Home
  2. Docs
  3. Application Framework
  4. CLI Reference
  5. build-plugin

build-plugin

$ wp mwp build-plugin <slug>

When it is time to release a new version of your plugin, use the WP CLI to update your plugin version and build a release package (zip file) which contains your production plugin files.

You can specify which files from your development plugin folder should be ignored when building the release package via the .buildignore file in your plugin directory.

Note: Plugins that are built using the build-plugin command will automatically have the version of the MWP Framework you are developing on bundled in with the plugin in the release package. This makes your plugin installable with no dependencies.

@Params

<slug> (required) The slug (directory) of the plugin to build a release package for
--version-update=<version> (optional) An explicit version number, or auto-increment by using =(major, minor, point, patch)
--stable (optional) If this flag is specified on the command line, your built zip package will also be copied to a file in your /builds folder named {plugin-slug}-stable.zip
--dev (optional) If this flag is specified on the command line, your built zip package will also be copied to a file in your /builds folder named {plugin-slug}-dev.zip
--nobundle (optional) If this flag is specified then the MWP Framework will not be bundled with the plugin for distribution.

Note: If no --version-update is specified, the current plugin version will be rebuilt and there will be no version change. Built release packages are placed into the /builds directory of your plugin.

@Example

$ wp mwp build-plugin acmecompany-gizmo --version-update=minor
Building release package... acmecompany-gizmo-0.1.0.zip
Plugin package successfully built.

Was this article helpful to you? Yes No

How can we help?