From 9a8b1b329051ef69d791fc12e0a410171f01ad7e Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 21 Dec 2014 14:38:36 -0600 Subject: [PATCH 1/2] update erlydtl provider to use namespaces --- src/rebar_prv_erlydtl_compiler.erl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rebar_prv_erlydtl_compiler.erl b/src/rebar_prv_erlydtl_compiler.erl index 8ae6d031..a922404b 100644 --- a/src/rebar_prv_erlydtl_compiler.erl +++ b/src/rebar_prv_erlydtl_compiler.erl @@ -105,7 +105,7 @@ -include("rebar.hrl"). --define(PROVIDER, erlydtl). +-define(PROVIDER, compile). -define(DEPS, []). %% =================================================================== @@ -116,9 +116,10 @@ init(State) -> State1 = rebar_state:add_provider(State, providers:create([{name, ?PROVIDER}, {module, ?MODULE}, + {namespace, erlydtl}, {bare, false}, {deps, ?DEPS}, - {example, "rebar erlydtl compile"}, + {example, "rebar3 erlydtl compile"}, {short_desc, "Compile erlydtl templates."}, {desc, ""}, {opts, []}])), @@ -126,8 +127,6 @@ init(State) -> do(Config) -> MultiDtlOpts = erlydtl_opts(Config), - OrigPath = code:get_path(), - %true = code:add_path(rebar_utils:ebin_dir()), Result = lists:foldl(fun(DtlOpts, _) -> file:make_dir(option(out_dir, DtlOpts)), @@ -143,7 +142,6 @@ do(Config) -> {recursive, option(recursive, DtlOpts)}]) end, ok, MultiDtlOpts), - true = code:set_path(OrigPath), {Result, Config}. -spec format_error(any()) -> iolist(). From afdc62409edcaad251ca7f5830d9c90bf9a881aa Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 21 Dec 2014 14:40:41 -0600 Subject: [PATCH 2/2] set deps back to tsloughter/providers and erlware/relx --- rebar.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rebar.config b/rebar.config index fd3e53f7..a9b667e6 100644 --- a/rebar.config +++ b/rebar.config @@ -22,14 +22,14 @@ {git, "https://github.com/erlware/erlware_commons.git", {branch, "master"}}}, {providers, "", - {git, "https://github.com/ferd/providers.git", - {branch, "namespaces"}}}, + {git, "https://github.com/tsloughter/providers.git", + {branch, "master"}}}, {erlydtl, ".*", {git, "https://github.com/erlydtl/erlydtl.git", {tag, "0.9.4"}}}, {relx, "", - {git, "https://github.com/tsloughter/relx.git", - {branch, "format_error1"}}}, + {git, "https://github.com/erlware/relx.git", + {branch, "master"}}}, {getopt, "", {git, "https://github.com/jcomellas/getopt.git", {branch, "master"}}}, {meck, "", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.2"}}}]}.