Skip to content

Commit

Permalink
update templates of rebar3 grisp configure for grisp.io (#90)
Browse files Browse the repository at this point in the history
* update templates

* update template to support updates and reboot

* signature options
  • Loading branch information
GwendalLaurent authored Nov 13, 2024
1 parent eaf66ce commit 66c2192
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
7 changes: 6 additions & 1 deletion priv/templates/common/rebar.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{deps, [
{{^grisp_io}}grisp{{/grisp_io}}{{#grisp_io}}{grisp_connect, {git, "https://github.com/grisp/grisp_connect", {branch, "main"}}}{{/grisp_io}}{{^epmd}}
{{^grisp_io}}grisp{{/grisp_io}}{{#grisp_io}}{grisp_connect, "1.0.0"},
grisp_updater_grisp2{{/grisp_io}}{{^epmd}}
{{/epmd}}{{#epmd}},
{epmd, {git, "https://github.com/erlang/epmd", {ref, "4d1a59"}}}
{{/epmd}}
Expand All @@ -25,6 +26,10 @@
{{#epmd}}
{epmd, none},
{{/epmd}}
{{#grisp_io}}
{grisp_updater_grisp2, load},
sasl,
{{/grisp_io}}
{{{name}}}
]}
]}.
14 changes: 13 additions & 1 deletion priv/templates/common/sys.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
{{#grisp_io_linking}} {grisp_connect,[
{device_linking_token,<<"{{{token}}}">>}
]},
{{/grisp_io_linking}} {{{{name}}}, [
{{/grisp_io_linking}}
{{#grisp_io}} {grisp_updater, [
{signature_check, false}, % Set to 'true' and uncomment next line to enable signature check
% {signature_certificates, {priv, grisp_demo, "certificates/updates"}},
{system, {grisp_updater_grisp2, #{}}},
{sources, [
{grisp_updater_tarball, #{}},
{grisp_updater_http, #{
backend => {grisp_updater_grisp2, #{}}
}}
]}
]},
{{/grisp_io}} {{{{name}}}, [
]}
].
2 changes: 2 additions & 0 deletions priv/templates/network/grisp.ini.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[erlang]
args = erl.rtems -C multi_time_warp -- -mode embedded -home . -pa . -root {{release_name}} -bindir {{release_name}}/erts-{{erts_vsn}}/bin -boot {{release_name}}/releases/{{release_version}}/start -config {{release_name}}/releases/{{release_version}}/sys.config <%#network%>-kernel inetrc "./erl_inetrc"<%/network%> <%#epmd%>-internal_epmd epmd_sup -sname {{release_name}} -setcookie <%={{ }}=%> {{{cookie}}} {{=<% %>=}} <%/epmd%>
shell = erlang
on_exit = reboot
on_crash = reboot

[network]
ip_self=dhcp
Expand Down

0 comments on commit 66c2192

Please sign in to comment.