Skip to content

Commit 03de0c9

Browse files
committed
Add grisp pack command
1 parent 0184ec3 commit 03de0c9

File tree

7 files changed

+410
-27
lines changed

7 files changed

+410
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- New `-t/--tar` option to the deploy command to save a grisp release tarball in
1313
the `_grisp/deploy` directory.
1414
- New firmware command to generate GRiSP 2 binary firmwares: [#83](https://github.com/grisp/rebar3_grisp/pull/83)
15+
- New pack command to generate GRiSP 2 software update package: [#84](https://github.com/grisp/rebar3_grisp/pull/84)
1516

1617
### Changed
1718

rebar.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{erl_opts, [debug_info]}.
22

33
{deps, [
4-
grisp_tools,
4+
% grisp_tools,
5+
{grisp_tools, {git, "git@github.com:grisp/grisp_tools", {branch, "sylane/pack-command"}}},
56
grid
67
]}.

rebar.lock

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,64 @@
11
{"1.2.0",
22
[{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.12.2">>},1},
33
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.12.0">>},2},
4-
{<<"grid">>,{pkg,<<"grid">>,<<"0.1.0">>},0},
5-
{<<"grisp_tools">>,{pkg,<<"grisp_tools">>,<<"2.6.1">>},0},
6-
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.18.2">>},1},
4+
{<<"edifa">>,{pkg,<<"edifa">>,<<"1.0.0">>},1},
5+
{<<"erlexec">>,{pkg,<<"erlexec">>,<<"2.0.7">>},2},
6+
{<<"grid">>,{pkg,<<"grid">>,<<"0.2.1">>},0},
7+
{<<"grisp_tools">>,
8+
{git,"git@github.com:grisp/grisp_tools",
9+
{ref,"8135376517b01df25b36a6acd966c2e8d702971e"}},
10+
0},
11+
{<<"grisp_update_packager">>,
12+
{git,"git@github.com:grisp/grisp_update_packager",
13+
{ref,"753d621f36907e3d5676cc0bf0db43276f39c5a6"}},
14+
1},
15+
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.20.1">>},1},
716
{<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},2},
817
{<<"mapz">>,{pkg,<<"mapz">>,<<"2.4.0">>},1},
918
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
1019
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.3.0">>},2},
1120
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.4.1">>},2},
21+
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.7">>},3},
1222
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.7">>},2},
13-
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},2}]}.
23+
{<<"termseal">>,{pkg,<<"termseal">>,<<"0.1.1">>},2},
24+
{<<"textual">>,{pkg,<<"textual">>,<<"0.1.1">>},1},
25+
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},2},
26+
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.4">>},2}]}.
1427
[
1528
{pkg_hash,[
1629
{<<"bbmustache">>, <<"0CABDCE0DB9FE6D3318131174B9F2B351328A4C0AFBEB3E6E99BB0E02E9B621D">>},
1730
{<<"certifi">>, <<"2D1CCA2EC95F59643862AF91F001478C9863C2AC9CB6E2F89780BFD8DE987329">>},
18-
{<<"grid">>, <<"880F3D2E5B4E9B3B93FDE2BC93F11F6CD6DE82BE886D3AF026C2D6A17C762907">>},
19-
{<<"grisp_tools">>, <<"492F579EE450C7618EDB118A5BBC3F8FE00EC0073305246B80C444C1B176EE8C">>},
20-
{<<"hackney">>, <<"D7FF544DDAE5E1CB49E9CF7FA4E356D7F41B283989A1C304BFC47A8CC1CF966F">>},
31+
{<<"edifa">>, <<"0F1A01A0C79B7135F334B3FCEEB624F0574C5ED3E4554B06C8664AADA6A339C8">>},
32+
{<<"erlexec">>, <<"76D0BC7487929741B5BB9F74DA2AF5DAF1492134733CF9A05C7AAA278B6934C5">>},
33+
{<<"grid">>, <<"4DCBF6155AB24131CB493D417F28093F019197ED7401F28BF82FF60E2C9B0D2C">>},
34+
{<<"hackney">>, <<"8D97AEC62DDDDD757D128BFD1DF6C5861093419F8F7A4223823537BAD5D064E2">>},
2135
{<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>},
2236
{<<"mapz">>, <<"77A8E38B69BAB16C5D3EBD44E6C619F8AF1F1598B0CAAE301D266605A0865756">>},
2337
{<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>},
2438
{<<"mimerl">>, <<"D0CD9FC04B9061F82490F6581E0128379830E78535E017F7780F37FEA7545726">>},
2539
{<<"parse_trans">>, <<"6E6AA8167CB44CC8F39441D05193BE6E6F4E7C2946CB2759F015F8C56B76E5FF">>},
40+
{<<"quickrand">>, <<"D2BD76676A446E6A058D678444B7FDA1387B813710D1AF6D6E29BB92186C8820">>},
2641
{<<"ssl_verify_fun">>, <<"354C321CF377240C7B8716899E182CE4890C5938111A1296ADD3EC74CF1715DF">>},
27-
{<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>}]},
42+
{<<"termseal">>, <<"C9D93D4FF638EE99F9377D3438FC7AD132D2901EBBAF10C54F8DEA1D7E24D61C">>},
43+
{<<"textual">>, <<"42D6AFE1E58F128E607C237EC213CD3DD69B780A3527039B2A90CA6600456B3C">>},
44+
{<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>},
45+
{<<"uuid">>, <<"77C3E3EE1E1701A2856CE945846D7CEB71931C60633A305D0B0FEAE03B2B3B5C">>}]},
2846
{pkg_hash_ext,[
2947
{<<"bbmustache">>, <<"688B33A4D5CC2D51F575ADF0B3683FC40A38314A2F150906EDCFC77F5B577B3B">>},
3048
{<<"certifi">>, <<"EE68D85DF22E554040CDB4BE100F33873AC6051387BAF6A8F6CE82272340FF1C">>},
31-
{<<"grid">>, <<"E71751225A9DFF8C7C96551CC181C0FDD8D8C666D3C2FE44A832D6F8B7BE0013">>},
32-
{<<"grisp_tools">>, <<"7642DE1A466B92AE70C0924605211AD126F65B0F2BFC56069FA996C5CCC78104">>},
33-
{<<"hackney">>, <<"AF94D5C9F97857DB257090A4A10E5426ECB6F4918AA5CC666798566AE14B65FD">>},
49+
{<<"edifa">>, <<"A1E010561E7D236A24C668D95626BE2BFE082ED0331CE1E6798BE0CD43F59A7B">>},
50+
{<<"erlexec">>, <<"AF2DD940BB8E32F5AA40A65CB455DCAA18F5334FD3507E9BFD14A021E9630897">>},
51+
{<<"grid">>, <<"C8EA819A0E40631BECE3149FBA7D306DF6CF8BC35358089878F05B20E6D87D4C">>},
52+
{<<"hackney">>, <<"FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3">>},
3453
{<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>},
3554
{<<"mapz">>, <<"4B68DF5CF0522E0D6545DF7B681BC052865CDB78405AD4CC9C55FE45EE7B25BE">>},
3655
{<<"metrics">>, <<"69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16">>},
3756
{<<"mimerl">>, <<"A1E15A50D1887217DE95F0B9B0793E32853F7C258A5CD227650889B38839FE9D">>},
3857
{<<"parse_trans">>, <<"620A406CE75DADA827B82E453C19CF06776BE266F5A67CFF34E1EF2CBB60E49A">>},
58+
{<<"quickrand">>, <<"B8ACBF89A224BC217C3070CA8BEBC6EB236DBE7F9767993B274084EA044D35F0">>},
3959
{<<"ssl_verify_fun">>, <<"FE4C190E8F37401D30167C8C405EDA19469F34577987C76DDE613E838BBC67F8">>},
40-
{<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>}]}
60+
{<<"termseal">>, <<"466280936214AF1894FC431642E83341B7D13580A3F3485820A2D300C5CAEB49">>},
61+
{<<"textual">>, <<"28C1AE5DE77D3A13C9101DD64204C87069232149C2B924762F43D75730516CE9">>},
62+
{<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>},
63+
{<<"uuid">>, <<"7A4CCD1C151D9B88B4383FA802BCCF9BCB3754B7F53D7CAA164D51A14A6652E4">>}]}
4164
].

src/rebar3_grisp.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ init(State) ->
1919
rebar3_grisp_package,
2020
rebar3_grisp_version,
2121
rebar3_grisp_report,
22-
rebar3_grisp_firmware
22+
rebar3_grisp_firmware,
23+
rebar3_grisp_pack
2324
]).

src/rebar3_grisp_firmware.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ init(State) ->
5252
"If no bundle file is specified, it will be generated by "
5353
"calling 'rebar3 grisp deploy' with the optional release name "
5454
"and version. As for the deploy command, options passed after "
55-
"'--' are sent to the Rebar 3 release task.\n"
55+
"'--' are sent to the rebar 3 release task.\n"
5656
}
5757
]),
5858
{ok, rebar_state:add_provider(State, Provider)}.
@@ -283,7 +283,7 @@ event([firmware, prepare, _, {error, not_a_file, Path}]) ->
283283
event([firmware, build_firmware, create_image]) ->
284284
console("* Creating disk image...");
285285
event([firmware, build_firmware, create_image, {error, Reason}]) ->
286-
abort_message("Failed to create firmware image file; ~s", Reason);
286+
abort_message("Failed to create firmware image file: ~s", Reason);
287287
event([firmware, build_firmware, copy_bootloader]) ->
288288
console("* Writing bootloader...");
289289
event([firmware, build_firmware, copy_bootloader, {error, Reason}]) ->
@@ -346,9 +346,9 @@ event(Event) ->
346346
debug("[rebar3_grisp] ~p", [Event]),
347347
case lists:last(Event) of
348348
{error, Reason, Info} when is_binary(Info) ->
349-
abort("Unexpected 1 ~p error: ~s", [Reason, Info]);
349+
abort("Unexpected ~p error: ~s", [Reason, Info]);
350350
{error, Reason, Info} ->
351-
abort("Unexpected 2 ~p error: ~p", [Reason, Info]);
351+
abort("Unexpected ~p error: ~p", [Reason, Info]);
352352
{error, Reason} ->
353353
abort("Unexpected ~p error", [Reason]);
354354
_ -> ok

0 commit comments

Comments
 (0)