Created
September 19, 2014 23:54
-
-
Save tsloughter/4cf90de8b42c7a9f3bd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
-module(dummy). | |
-behaviour(rebar_provider). | |
-export([init/1, | |
do/1]). | |
-define(PROVIDER, dummy). | |
-define(DEPS, []). | |
%% =================================================================== | |
%% Public API | |
%% =================================================================== | |
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}. | |
init(State) -> | |
State1 = rebar_state:prepend_hook(State, compile, | |
rebar_provider:create([{name, ?PROVIDER}, | |
{provider_impl, ?MODULE}, | |
{bare, false}, | |
{deps, ?DEPS}, | |
{example, "rebar dummy"}, | |
{short_desc, "Dummy plugin."}, | |
{desc, ""}, | |
{opts, []}])), | |
{ok, State1}. | |
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | relx:error(). | |
do(State) -> | |
io:format("I am a dummy plugin.~n", []), | |
{ok, State}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment