Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion priv/templates/common/otp_app.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
{applications, [
kernel,
stdlib,
{{^grisp_io}}grisp{{/grisp_io}}{{#grisp_io}}grisp_connect{{/grisp_io}}
grisp{{#grisp_io}},
certifi,
grisp_cryptoauth,
grisp_connect{{/grisp_io}}
]},
{env,[]},
{modules, []},
Expand Down
10 changes: 7 additions & 3 deletions priv/templates/common/rebar.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{deps, [
{{^grisp_io}}grisp{{/grisp_io}}{{#grisp_io}}grisp_connect,
grisp_updater_grisp2{{/grisp_io}}{{^epmd}}
grisp{{^grisp_io}}
{{/grisp_io}}{{#grisp_io}},
certifi,
grisp_cryptoauth,
grisp_updater_grisp2,
grisp_connect{{/grisp_io}}{{^epmd}}
{{/epmd}}{{#epmd}},
{epmd, {git, "https://github.com/erlang/epmd", {ref, "4d1a59"}}}
{{/epmd}}
]}.

{erl_opts, [debug_info]}.

{plugins, [rebar3_grisp]}.
{project_plugins, [rebar3_grisp]}.

{grisp, [
{otp, [
Expand Down
53 changes: 46 additions & 7 deletions priv/templates/common/sys.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
[
{{#grisp_io_linking}} {grisp_connect,[
{device_linking_token,<<"{{{token}}}">>}
{{{{name}}}, [
]}{{^grisp_io}}
{{/grisp_io}}{{#grisp_io}},
{grisp_keychain, [
{api_module, grisp_cryptoauth}
]},
{{/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"}},
{grisp_cryptoauth, [
{tls_server_trusted_certs_cb, {certifi, cacerts, []}}
]},
{grisp_connect, [{{^grisp_io_linking}}{{/grisp_io_linking}}{{#grisp_io_linking}}
{device_linking_token,<<"{{{token}}}">>},{{/grisp_io_linking}}
% Disable the log handler defined in grisp_connect application default
% configuration, as it was explicitly started in kernel configuration
% in order to catch the log entries before grisp_connect is started.
{logger, []}
]},
{grisp_updater, [
{system, {grisp_updater_grisp2, #{}}},
{sources, [
{grisp_updater_tarball, #{}},
Expand All @@ -14,6 +24,35 @@
}}
]}
]},
{{/grisp_io}} {{{{name}}}, [
{kernel, [
{logger_level, notice},
{logger, [
{handler, default, logger_std_h, #{
level => notice,
formatter => {grisp_connect_log, #{
legacy_header => false,
single_line => true,
description_only => true
}},
filter_default => log,
filters => [
% Filter out supervisor progress reports so TLS certificates
% are not swamping the console if level is set to info...
{disable_progress, {fun logger_filters:progress/2, stop}}
]
}},
{handler, grisp_connect_log_handler, grisp_connect_logger_bin, #{
level => notice,
filter_default => log,
formatter => {grisp_connect_logger_bin, #{}},
filters => [
% Filter out supervisor progress reports so TLS certificates
% are not swamping grisp.io if level is set to info...
{disable_progress, {fun logger_filters:progress/2, stop}}
]
}
}
]}
]}
{{/grisp_io}}
].
6 changes: 3 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{<<"edifa">>,{pkg,<<"edifa">>,<<"1.0.0">>},1},
{<<"erlexec">>,{pkg,<<"erlexec">>,<<"2.0.7">>},2},
{<<"grid">>,{pkg,<<"grid">>,<<"0.2.1">>},0},
{<<"grisp_tools">>,{pkg,<<"grisp_tools">>,<<"2.8.1">>},0},
{<<"grisp_tools">>,{pkg,<<"grisp_tools">>,<<"2.8.2">>},0},
{<<"grisp_update_packager">>,{pkg,<<"grisp_update_packager">>,<<"1.0.2">>},1},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.20.1">>},1},
{<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},2},
Expand All @@ -25,7 +25,7 @@
{<<"edifa">>, <<"0F1A01A0C79B7135F334B3FCEEB624F0574C5ED3E4554B06C8664AADA6A339C8">>},
{<<"erlexec">>, <<"76D0BC7487929741B5BB9F74DA2AF5DAF1492134733CF9A05C7AAA278B6934C5">>},
{<<"grid">>, <<"4DCBF6155AB24131CB493D417F28093F019197ED7401F28BF82FF60E2C9B0D2C">>},
{<<"grisp_tools">>, <<"8E882F0D75695B9EFF5AB4BC1E076246086D87DA095D5114F43451D11A2EE101">>},
{<<"grisp_tools">>, <<"B6D79851A2774A317C2049C18C6C552A907FFC2E47EDF2310E4E66FECDD9C8D1">>},
{<<"grisp_update_packager">>, <<"A74922B6602159A6718B1EE13045D3866BFF26D6A49C8C7A8EABC5F352E41BB9">>},
{<<"hackney">>, <<"8D97AEC62DDDDD757D128BFD1DF6C5861093419F8F7A4223823537BAD5D064E2">>},
{<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>},
Expand All @@ -45,7 +45,7 @@
{<<"edifa">>, <<"A1E010561E7D236A24C668D95626BE2BFE082ED0331CE1E6798BE0CD43F59A7B">>},
{<<"erlexec">>, <<"AF2DD940BB8E32F5AA40A65CB455DCAA18F5334FD3507E9BFD14A021E9630897">>},
{<<"grid">>, <<"C8EA819A0E40631BECE3149FBA7D306DF6CF8BC35358089878F05B20E6D87D4C">>},
{<<"grisp_tools">>, <<"D761A141D96B03FE182937434DE96D325923126F50606A0ADDE64864C5F469F7">>},
{<<"grisp_tools">>, <<"36DEC2A36FEBF295E0E8DBC6305BB9FECC6A2C8B696E48A0F5CC6623A9B30B76">>},
{<<"grisp_update_packager">>, <<"6484C6910C7F4CF235119206A5FEFD16ED08BE2D3A16E62EC1820A207B4D5B20">>},
{<<"hackney">>, <<"FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3">>},
{<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>},
Expand Down