Skip to content

Executing The Plugin

hyperthunk edited this page Oct 6, 2011 · 3 revisions

The plugin can be executed in one of two ways. Firstly, the plugin exports two new rebar commands:

  • dist: evaluates the plugin configuration and builds any defined assemblies

  • distclean: removes all generated output from the file system

The dist command will fail if no assemblies are configured to execute (see [[Configuring the Plugin]] for details). Any other invalid configuration will also cause execution to fail. You can get more information about what’s gone wrong by running rebar with the verbose option (rebar dist -v will do it).

The distclean command will complete successfully whether or not there are any output files (or directories) to remove.

Attaching to Other Commands

You can optionally configure the plugin to run dist during the standard rebar generate command, and the distclean command during clean. To do this, simply attach the following top level plugin configuration:

rebar.config

{dist, [
    {attach, [generate, clean]}  %% you can provide, either or both
]}.

Please note that this configuration is based on a recent version of rebar, (one that supports the changes from [[https://github.com/basho/rebar/pull/80]]).

Clone this wiki locally