From 2ea1cebd8a3cf5a4128ec64cfe368a0da4571b68 Mon Sep 17 00:00:00 2001 From: Laszlo Toth Date: Thu, 27 Sep 2018 21:11:26 +0200 Subject: [PATCH] #25: add init/1 function and make the plugin rebar3 compatible --- src/rebar_vsn_plugin.erl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rebar_vsn_plugin.erl b/src/rebar_vsn_plugin.erl index 4742626..b0857e9 100644 --- a/src/rebar_vsn_plugin.erl +++ b/src/rebar_vsn_plugin.erl @@ -27,6 +27,7 @@ %% to integrate with another rebar plugins (like the ChicagoBoss' one) -export([make_vsn/0]). +-export([init/1]). %%============================================================================ %% API @@ -45,6 +46,12 @@ make_vsn() -> {Vsn, RawRef, RawCount} = collect_default_refcount(), build_vsn_string(Vsn, RawRef, RawCount). +-spec init(State) -> Res when + State :: rebar_state:t(), + Res :: rebar_state:t(). +init(State) -> + {ok, State}. + %%============================================================================ %% Internal Functions %%============================================================================