%% -*- mode: erlang; indent-tabs-mode: nil -*-

{erl_opts, [debug_info]}.

%% IMPORTANT! Versions of proper are calculated dynamically in the 'rebar.config.script' file, at the end;
%%            DO NOT set/change the proper version here!
{profiles, [{test, [{deps, [proper]},
                    {plugins, [{rebar3_proper, {git, "https://github.com/ferd/rebar3_proper", {tag, "0.12.1"}}}]},
                    {src_dirs, ["src", "test"]}]},
            {dialyzer, []}]}.

{pre_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", ct,
              "bin/lfescript bin/lfec"
              " -o $REBAR_DEPS_DIR/lfe/test"
              " test/*_SUITE.lfe"},
             {"(linux|darwin|solaris|freebsd|netbsd|openbsd)", eunit,
              "bin/lfescript bin/lfec"
              " -o $REBAR_DEPS_DIR/lfe/ebin"
              " test/clj-tests.lfe test/maps-tests.lfe"},
             %% TODO: Test this on a win32 box
             %%  {"win32", ct,
             %%   "bin/lfescript bin/lfec -o $REBAR_DEPS_DIR/lfe/test test/*_SUITE.lfe"}
             {"(linux|darwin|solaris|freebsd|netbsd|openbsd)", app_compile,
              "bin/lfescript bin/lfec -o $REBAR_DEPS_DIR/lfe/ebin src/*.lfe"}
             %% TODO: equivalent win32 hook
            ]}.

%% Use the following with 'rebar3 as maintainer publish'
{profiles, [{maintainer, [{plugins, [rebar3_hex]}]}]}.
{alias, [{publish, [compile, {hex, "publish package"}]}]}.

