summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorfeng19 <feng_19@foxmail.com>2018-06-21 10:24:56 +0800
committerfeng19 <feng_19@foxmail.com>2018-06-21 10:24:56 +0800
commit482718b8bf31024d919aabad1da2e9116411f2aa (patch)
tree1c693d007b98b0fc31a23aac19abbf94096ad9ef /priv
parentdc0f8b4d66d12c10ed4df85148b5e8ce13056f40 (diff)
parent38865da7ba01e7d5e60316e970f01959e85759ee (diff)
Merge tag '3.6.0' into refresh_paths
Bump to 3.6.0 - Introduce support of add and del operations for overrides - OTP-21 compatibility - Bump cth_readable for OTP-21 compat - upgrade relx to 3.25.0 - upgrade bbmustache to 1.5.0 - run compile provider in default namespace from bare compiling (fixes hooks for mix builds) - Resolve string vs list crashing rebar3 in erl_first_files - Create ERLANG_LIB_*_erl_interface environment variables only if erl_interface exists - Add hooks to the upgrade command - Add --start-clean flag to rebar3 shell - Auto-boot main app in OTP app project templates - Use maps for child spec examples in templates
Diffstat (limited to 'priv')
-rw-r--r--priv/templates/app.template2
-rw-r--r--priv/templates/app_rebar.config7
-rw-r--r--priv/templates/escript_rebar.config2
-rw-r--r--priv/templates/sup.erl3
4 files changed, 12 insertions, 2 deletions
diff --git a/priv/templates/app.template b/priv/templates/app.template
index d0bebd7..7d68b2c 100644
--- a/priv/templates/app.template
+++ b/priv/templates/app.template
@@ -6,7 +6,7 @@
{template, "app.erl", "{{name}}/src/{{name}}_app.erl"}.
{template, "sup.erl", "{{name}}/src/{{name}}_sup.erl"}.
{template, "otp_app.app.src", "{{name}}/src/{{name}}.app.src"}.
-{template, "rebar.config", "{{name}}/rebar.config"}.
+{template, "app_rebar.config", "{{name}}/rebar.config"}.
{template, "gitignore", "{{name}}/.gitignore"}.
{template, "LICENSE", "{{name}}/LICENSE"}.
{template, "README.md", "{{name}}/README.md"}.
diff --git a/priv/templates/app_rebar.config b/priv/templates/app_rebar.config
new file mode 100644
index 0000000..203ce4a
--- /dev/null
+++ b/priv/templates/app_rebar.config
@@ -0,0 +1,7 @@
+{erl_opts, [debug_info]}.
+{deps, []}.
+
+{shell, [
+ % {config, [{config, "config/sys.config"}]},
+ {apps, [{{name}}]}
+]}.
diff --git a/priv/templates/escript_rebar.config b/priv/templates/escript_rebar.config
index ef498a8..3ed7150 100644
--- a/priv/templates/escript_rebar.config
+++ b/priv/templates/escript_rebar.config
@@ -5,7 +5,7 @@
[{{name}}]}.
{escript_main_app, {{name}}}.
{escript_name, {{name}}}.
-{escript_emu_args, "%%! +sbtu +A0\n"}.
+{escript_emu_args, "%%! +sbtu +A1\n"}.
%% Profiles
{profiles, [{test,
diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl
index a2e7209..0db7155 100644
--- a/priv/templates/sup.erl
+++ b/priv/templates/sup.erl
@@ -26,6 +26,9 @@ start_link() ->
%% Supervisor callbacks
%%====================================================================
+%% Child :: #{id => Id, start => {M, F, A}}
+%% Optional keys are restart, shutdown, type, modules.
+%% Before OTP 18 tuples must be used to specify a child. e.g.
%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
init([]) ->
{ok, { {one_for_all, 0, 1}, []} }.