Current section
Files
Jump to
Current section
Files
rebar.config
% This is a (manually crafted) configuration file of rebar3 *in the context of
% an hex package* (ex: in this case only src/ is package, and none of the root
% GNUmake* files), so that Ceylan-Myriad can better integrate in the current OTP
% ecosystem, despite its (more complex) build based on GNU make.
% Base layout was obtained thanks to: 'rebar3 new lib myriad', as Myriad is a
% library OTP application (without supervision trees).
% To be run from the library root as 'rebar3 compile' or 'rebar3 release'.
% See also:
% - http://erlang.org/doc/design_principles/release_structure.html
% - https://www.rebar3.org/docs/releases
% - https://learnyousomeerlang.com/release-is-the-word
% Settings for the 'default' profile follow.
% No dependency (except Erlang of course):
{deps, []}.
% We need to rely on our dedicated build procedure (ex: for the parse transforms
% involved):
%
% Could not set REBAR_PROFILE=$(REBAR_PROFILE):
%
{pre_hooks, [ {compile, "priv/hex-compile-hook-script.sh"} ]}.
%{post_hooks, [
% {compile, "echo 'Myriad hex post-compile hook!'"} ]}.
% For release generation:
%
% (defaults are for the development mode)
%
{relx, [
{release, {myriad_release, {cmd, "cat GNUmakevars.inc | grep 'MYRIAD_VERSION := '| sed 's|^MYRIAD_VERSION := ||1' | tr -d '\n'"}}, [sasl, myriad]},
%{sys_config, "./config/sys.config"},
%{vm_args, "./config/vm.args"},
{dev_mode, true},
{include_erts, false},
{extended_start_script, true},
{include_src, false}
]}.
{profiles, [
% Production mode:
{prod, [ {relx, [
% Same as default profile:
{release, {myriad_release, {cmd, "cat GNUmakevars.inc | grep 'MYRIAD_VERSION := '|sed 's|^MYRIAD_VERSION := ||1' | tr -d '\n'"}}, [sasl, myriad]},
% For the build makefiles:
{env, [ { 'REBAR_PROFILE', "prod" } ] },
% Not wanting the release to contain symlinks to applications:
{dev_mode, false},
% Creating a full target system:
{include_erts, true},
{extended_start_script, true},
{include_src, false}
]}]
}] }.
% For packages:
%
% (use 'rebar3 update' to enable the hex plugin)
%
{plugins, [rebar3_hex]}.