aboutsummaryrefslogtreecommitdiffstats
path: root/test/rlx_prv_release_alias.erl
blob: 523940ce70acccd9ff098bf07528a90cc700847e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-module(rlx_prv_release_alias).

-behaviour(provider).

-export([init/1, do/1, format_error/1]).

-define(PROVIDER, test_release_alias).
-define(DEPS, [app_discover]).

%%============================================================================
%% API
%%============================================================================

-spec init(rlx_state:t()) -> {ok, rlx_state:t()}.
init(State) ->
    State1 = rlx_state:add_provider(State, providers:create([{name, ?PROVIDER},
                                                             {module, ?MODULE},
                                                             {deps, ?DEPS}])),
    {ok, State1}.

-spec do(rlx_state:t()) -> {ok, rlx_state:t()} | relx:error().
do(State) ->
    rlx_prv_release:do(State).

-spec format_error(ErrorDetail::term()) -> iolist().
format_error(ErrorDetail) ->
    rlx_prv_release:format_error(ErrorDetail).