summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-10-05 10:57:58 -0400
committerTristan Sloughter <t@crashfast.com>2018-10-05 08:57:58 -0600
commitd538be3481e65a00f2817344f697f88b1b55f8c3 (patch)
tree4d3ced7bfc2c7565be2bc013ec5b596ec388294d
parentdec484643c233fda9c17d38c1854ba7f3f37547b (diff)
Bump bbmustache and fix templates (#1862)
* bump bbmustache to version 1.6.0 * Use alternative bbmustache brackets in templates This fixes the problems where literal nested tuples (`{{a,b},c}` or `{{a,b}}`) would blow up and spaces needed to be inserted.
-rw-r--r--priv/templates/otp_app.app.src7
-rw-r--r--priv/templates/plugin_README.md13
-rw-r--r--priv/templates/relx_rebar.config5
-rw-r--r--priv/templates/sup.erl7
-rw-r--r--priv/templates/sys.config3
-rw-r--r--rebar.config2
-rw-r--r--rebar.lock4
7 files changed, 23 insertions, 18 deletions
diff --git a/priv/templates/otp_app.app.src b/priv/templates/otp_app.app.src
index d694d87..6040089 100644
--- a/priv/templates/otp_app.app.src
+++ b/priv/templates/otp_app.app.src
@@ -1,8 +1,9 @@
-{application, {{name}},
- [{description, "{{desc}}"},
+{{=@@ @@=}}
+{application, @@name@@,
+ [{description, "@@desc@@"},
{vsn, "0.1.0"},
{registered, []},
- {mod, { {{name}}_app, []}},
+ {mod, {@@name@@_app, []}},
{applications,
[kernel,
stdlib
diff --git a/priv/templates/plugin_README.md b/priv/templates/plugin_README.md
index 7f9ba84..1176d95 100644
--- a/priv/templates/plugin_README.md
+++ b/priv/templates/plugin_README.md
@@ -1,7 +1,8 @@
-{{name}}
+{{=@@ @@=}}
+@@name@@
=====
-{{desc}}
+@@desc@@
Build
-----
@@ -14,13 +15,13 @@ Use
Add the plugin to your rebar config:
{plugins, [
- { {{name}}, ".*", {git, "git@host:user/{{name}}.git", {tag, "0.1.0"}}}
+ {@@name@@, {git, "https://host/user/@@name@@.git", {tag, "0.1.0"}}}
]}.
Then just call your plugin directly in an existing application:
- $ rebar3 {{name}}
- ===> Fetching {{name}}
- ===> Compiling {{name}}
+ $ rebar3 @@name@@
+ ===> Fetching @@name@@
+ ===> Compiling @@name@@
<Plugin Output>
diff --git a/priv/templates/relx_rebar.config b/priv/templates/relx_rebar.config
index 81b7dbe..30a629f 100644
--- a/priv/templates/relx_rebar.config
+++ b/priv/templates/relx_rebar.config
@@ -1,8 +1,9 @@
+{{=@@ @@=}}
{erl_opts, [debug_info]}.
{deps, []}.
-{relx, [{release, { {{name}}, "0.1.0" },
- [{{name}},
+{relx, [{release, {@@name@@, "0.1.0"},
+ [@@name@@,
sasl]},
{sys_config, "./config/sys.config"},
diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl
index 0db7155..020021c 100644
--- a/priv/templates/sup.erl
+++ b/priv/templates/sup.erl
@@ -1,9 +1,10 @@
+{{=@@ @@=}}
%%%-------------------------------------------------------------------
-%% @doc {{name}} top level supervisor.
+%% @doc @@name@@ top level supervisor.
%% @end
%%%-------------------------------------------------------------------
--module({{name}}_sup).
+-module(@@name@@_sup).
-behaviour(supervisor).
@@ -31,7 +32,7 @@ start_link() ->
%% 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}, []} }.
+ {ok, {{one_for_all, 0, 1}, []}}.
%%====================================================================
%% Internal functions
diff --git a/priv/templates/sys.config b/priv/templates/sys.config
index d892fd6..983801f 100644
--- a/priv/templates/sys.config
+++ b/priv/templates/sys.config
@@ -1,3 +1,4 @@
+{{=@@ @@=}}
[
- { {{name}}, []}
+ {@@name@@, []}
].
diff --git a/rebar.config b/rebar.config
index 6fb2384..1c19a91 100644
--- a/rebar.config
+++ b/rebar.config
@@ -7,7 +7,7 @@
{parse_trans, "3.3.0"}, % force otp-21 compat
{providers, "1.7.0"},
{getopt, "1.0.1"},
- {bbmustache, "1.5.0"},
+ {bbmustache, "1.6.0"},
{relx, "3.27.0"},
{cf, "0.2.2"},
{cth_readable, "1.4.2"},
diff --git a/rebar.lock b/rebar.lock
index c4cb615..0bf16f9 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -1,5 +1,5 @@
{"1.1.0",
-[{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.5.0">>},0},
+[{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.6.0">>},0},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.3.1">>},0},
{<<"cf">>,{pkg,<<"cf">>,<<"0.2.2">>},0},
{<<"cth_readable">>,{pkg,<<"cth_readable">>,<<"1.4.2">>},0},
@@ -13,7 +13,7 @@
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.3">>},0}]}.
[
{pkg_hash,[
- {<<"bbmustache">>, <<"8CFDE0602E90A4057E161BF5288ADE854B4E511E2E8924966A8438730E958381">>},
+ {<<"bbmustache">>, <<"7AC372AEC621A69C369DF237FBD9986CAABCDD6341089FE5F42E5A7A4AC706B8">>},
{<<"certifi">>, <<"D0F424232390BF47D82DA8478022301C561CF6445B5B5FB6A84D49A9E76D2639">>},
{<<"cf">>, <<"7F2913FFF90ABCABD0F489896CFEB0B0674F6C8DF6C10B17A83175448029896C">>},
{<<"cth_readable">>, <<"0F57B4EB7DA7F5438F422312245F9143A1B3118C11B6BAE5C3D1391C9EE88322">>},