From b7b33fbe8e7ffe152f6312787e7fc96f05c2f3e7 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 26 Aug 2020 16:10:13 -0600 Subject: [PATCH] add comments to release section of rebar.config template --- priv/templates/relx_rebar.config | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/priv/templates/relx_rebar.config b/priv/templates/relx_rebar.config index 30a629f0..3a19399f 100644 --- a/priv/templates/relx_rebar.config +++ b/priv/templates/relx_rebar.config @@ -6,16 +6,28 @@ [@@name@@, sasl]}, + {mode, dev}, + + %% automatically picked up if the files + %% exist but can be set manually, which + %% is required if the names aren't exactly + %% sys.config and vm.args {sys_config, "./config/sys.config"}, - {vm_args, "./config/vm.args"}, + {vm_args, "./config/vm.args"} - {dev_mode, true}, - {include_erts, false}, + %% the .src form of the configuration files do + %% not require setting RELX_REPLACE_OS_VARS + %% {sys_config_src, "./config/sys.config.src"}, + %% {vm_args_src, "./config/vm.args.src"} +]}. - {extended_start_script, true}] -}. +{profiles, [{prod, [{relx, + [%% prod is the default mode when prod + %% profile is used, so does not have + %% to be explicitly included like this + {mode, prod} -{profiles, [{prod, [{relx, [{dev_mode, false}, - {include_erts, true}]}] - }] -}. + %% use minimal mode to exclude ERTS + %% {mode, minimal} + ] + }]}]}.