From 542b3f5688e757597b3113a38e4c886651d1e1a6 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Thu, 5 Feb 2026 17:00:05 +0100 Subject: [PATCH 1/9] Do not specify a destination in the deploy command triggered by the firmware build --- src/rebar3_grisp_firmware.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rebar3_grisp_firmware.erl b/src/rebar3_grisp_firmware.erl index ade4e14..8adfa88 100644 --- a/src/rebar3_grisp_firmware.erl +++ b/src/rebar3_grisp_firmware.erl @@ -41,7 +41,7 @@ init(State) -> {image, $i, "image", {boolean, false}, "Generate an eMMC image firmware under _grisp/firmware"}, {bootloader, $b, "bootloader", {boolean, false}, "Generate a bootloader firmware under _grisp/firmware"}, {truncate, $t, "truncate", {boolean, true}, "Truncate the generated image firmware to contain only the first partition"}, - {quiet, $q, "quiet", {boolean, false}, "Do not show the instructions on how to burn the firmwares"} + {quiet, $q, "quiet", {boolean, false}, "Do not show the instructions on how to burn the firmwares"} ]}, {profiles, [grisp]}, {short_desc, "Generate GRiSP firmware image files"}, @@ -181,8 +181,7 @@ deploy_bundle(RState, Refresh, RelName, RelVsn, ExtraRelArgs) -> "deploy", "--tar", "--relname", atom_to_list(RelName), - "--relvsn", RelVsn, - "--destination", "" + "--relvsn", RelVsn ] ++ case Refresh =:= true of true -> ["--force"]; false -> [] From 7d46b6f87ce3b6bd60c7abf67e3de01bba55c168 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Wed, 18 Feb 2026 17:41:26 +0100 Subject: [PATCH 2/9] Remove obsolete scripts key Deploy copy scripts are now under the dist key --- src/rebar3_grisp_deploy.erl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/rebar3_grisp_deploy.erl b/src/rebar3_grisp_deploy.erl index d115f90..89510e4 100644 --- a/src/rebar3_grisp_deploy.erl +++ b/src/rebar3_grisp_deploy.erl @@ -57,8 +57,6 @@ do(RState) -> OTPVersion = rebar3_grisp_util:otp_version(Config), Board = rebar3_grisp_util:platform(Config), CopyDest = get_option(destination, [deploy, destination], RState, undefined), - PreScript = get_option(pre_script, [deploy, pre_script], RState, undefined), - PostScript = get_option(pre_script, [deploy, post_script], RState, undefined), {Args, _} = rebar_state:command_parsed_args(RState), Force = proplists:get_value(force, Args, false), Tar = proplists:get_value(tar, Args, false), @@ -112,11 +110,7 @@ do(RState) -> }}, shell => {fun rebar3_grisp_handler:shell/3, #{}}, release => {fun release_handler/2, RState2} - }), - scripts => #{ - pre_script => PreScript, - post_script => PostScript - } + }) }, State = grisp_tools:deploy(DeploySpec), #{release := RState3} = grisp_tools:handlers_finalize(State), From e84dedabf2c286a827a47e97e90940c4bd5b6bc8 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Wed, 18 Feb 2026 17:49:21 +0100 Subject: [PATCH 3/9] Remove obsolete tar key in release option The option is under distribute --- src/rebar3_grisp_deploy.erl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rebar3_grisp_deploy.erl b/src/rebar3_grisp_deploy.erl index 89510e4..ae9bad2 100644 --- a/src/rebar3_grisp_deploy.erl +++ b/src/rebar3_grisp_deploy.erl @@ -100,7 +100,6 @@ do(RState) -> name => RelName, version => RelVsn, profiles => Profiles, - tar => Tar, force => Force }, handlers => grisp_tools:handlers_init(#{ From 71cab355fc812f3c9a502174060a409788c25f3b Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Thu, 19 Feb 2026 12:35:01 +0100 Subject: [PATCH 4/9] Cleanup redundant code and unused force option --- src/rebar3_grisp_deploy.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rebar3_grisp_deploy.erl b/src/rebar3_grisp_deploy.erl index ae9bad2..e6be926 100644 --- a/src/rebar3_grisp_deploy.erl +++ b/src/rebar3_grisp_deploy.erl @@ -80,11 +80,11 @@ do(RState) -> bundle_dist_spec(RState2, RelName, RelVsn, Force) ]; {false, _} -> [ - copy_dist_spec(RState2, CopyDest, Force) + copy_dist_spec(RState2, Force) ]; {true, _} -> [ bundle_dist_spec(RState2, RelName, RelVsn, Force), - copy_dist_spec(RState2, CopyDest, Force) + copy_dist_spec(RState2, Force) ] end, Profiles = [P || P <- rebar_state:current_profiles(RState2), @@ -99,8 +99,7 @@ do(RState) -> release => #{ name => RelName, version => RelVsn, - profiles => Profiles, - force => Force + profiles => Profiles }, handlers => grisp_tools:handlers_init(#{ event => {fun event_handler/2, #{ @@ -228,7 +227,8 @@ format_error(Reason) -> %--- Internal ------------------------------------------------------------------ -copy_dist_spec(RState, CopyDest, Force) -> +copy_dist_spec(RState, Force) -> + CopyDest = get_option(destination, [deploy, destination], RState, undefined), PreScript = get_option(pre_script, [deploy, pre_script], RState, undefined), PostScript = get_option(pre_script, [deploy, post_script], RState, undefined), {copy, #{ From 70c3493d27a3246adc6ec9d85a9607c20b4674b7 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Thu, 19 Feb 2026 14:21:51 +0100 Subject: [PATCH 5/9] Make --tar option override the deploy config With this commit, specifyng the --tar option will ignore the deployment to a destination and avoid executing pre and post scripts that the user might have specified for the deployment. --- src/rebar3_grisp_deploy.erl | 45 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/rebar3_grisp_deploy.erl b/src/rebar3_grisp_deploy.erl index e6be926..183677a 100644 --- a/src/rebar3_grisp_deploy.erl +++ b/src/rebar3_grisp_deploy.erl @@ -57,6 +57,8 @@ do(RState) -> OTPVersion = rebar3_grisp_util:otp_version(Config), Board = rebar3_grisp_util:platform(Config), CopyDest = get_option(destination, [deploy, destination], RState, undefined), + PreScript = get_option(pre_script, [deploy, pre_script], RState, undefined), + PostScript = get_option(pre_script, [deploy, post_script], RState, undefined), {Args, _} = rebar_state:command_parsed_args(RState), Force = proplists:get_value(force, Args, false), Tar = proplists:get_value(tar, Args, false), @@ -73,20 +75,15 @@ do(RState) -> try {RelName, RelVsn} = rebar3_grisp_util:select_release(RState2, RelNameArg, RelVsnArg), - DistSpec = case {Tar, CopyDest} of - {false, D} when D =:= undefined; D =:= "" -> - error(no_deploy_destination); - {true, D} when D =:= undefined; D =:= "" -> [ - bundle_dist_spec(RState2, RelName, RelVsn, Force) - ]; - {false, _} -> [ - copy_dist_spec(RState2, Force) - ]; - {true, _} -> [ - bundle_dist_spec(RState2, RelName, RelVsn, Force), - copy_dist_spec(RState2, Force) - ] - end, + DistOptions = #{ + destination => CopyDest, + pre_script => PreScript, + post_script => PostScript, + tar => Tar, + force => Force, + bundle => + rebar3_grisp_util:bundle_file_path(RState, RelName, RelVsn) + }, Profiles = [P || P <- rebar_state:current_profiles(RState2), P =/= default, P =/= grisp, P =/= test], DeploySpec = #{ @@ -95,7 +92,7 @@ do(RState) -> otp_version_requirement => OTPVersion, platform => Board, custom_build => CustomBuild, - distribute => DistSpec, + distribute => distribution_spec(DistOptions), release => #{ name => RelName, version => RelVsn, @@ -227,10 +224,17 @@ format_error(Reason) -> %--- Internal ------------------------------------------------------------------ -copy_dist_spec(RState, Force) -> - CopyDest = get_option(destination, [deploy, destination], RState, undefined), - PreScript = get_option(pre_script, [deploy, pre_script], RState, undefined), - PostScript = get_option(pre_script, [deploy, post_script], RState, undefined), +distribution_spec(#{tar := true} = DistOptions) -> + [bundle_dist_spec(DistOptions)]; +distribution_spec(#{tar := false} = DistOptions) -> + [copy_dist_spec(DistOptions)]. + +copy_dist_spec(#{destination := undefined}) -> + error(no_deploy_destination); +copy_dist_spec(#{destination := CopyDest, + pre_script := PreScript, + post_script := PostScript, + force := Force}) -> {copy, #{ type => copy, force => Force, @@ -241,8 +245,7 @@ copy_dist_spec(RState, Force) -> } }}. -bundle_dist_spec(RState, RelName, RelVsn, Force) -> - BundleFile = rebar3_grisp_util:bundle_file_path(RState, RelName, RelVsn), +bundle_dist_spec(#{bundle := BundleFile, force := Force}) -> {bundle, #{ type => archive, force => Force, From 287e468a5f33e4b94d0693a3c764d06b45c81e01 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Thu, 19 Feb 2026 15:39:09 +0100 Subject: [PATCH 6/9] Update tar option description --- src/rebar3_grisp_deploy.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebar3_grisp_deploy.erl b/src/rebar3_grisp_deploy.erl index 183677a..cc5111e 100644 --- a/src/rebar3_grisp_deploy.erl +++ b/src/rebar3_grisp_deploy.erl @@ -33,7 +33,7 @@ init(State) -> {opts, [ {relname, $n, "relname", string, "Specify the name for the release that will be deployed"}, {relvsn, $v, "relvsn", string, "Specify the version of the release"}, - {tar, $t, "tar", {boolean, false}, "Create tarball with the release in _grisp/deploy"}, + {tar, $t, "tar", {boolean, false}, "Create a tarball with the release in _grisp/deploy, instead of deployng to 'destination'"}, {destination, $d, "destination", string, "Path to put deployed release in"}, {force, $f, "force", {boolean, false}, "Replace existing files"}, {pre_script, undefined, "pre-script", string, "Shell script to run before deploying begins"}, From 01fe88be3c5d77844a7ad8096fc5a7efd7f20967 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Thu, 19 Feb 2026 16:15:50 +0100 Subject: [PATCH 7/9] Update CHANGELOG --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43c2a96..2092315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- `rebar3 grisp deploy --tar` will not copy the release to the configured destination and will not execute `pre` and `post` scripts, usually defined in the `rebar.config` file. + +- the option `--destination` is ignored when using option `--tar` + +### Fixed + +- `rebar3 grisp firmware` command failure with latest rebar versions + ## [2.10.2] - 2026-01-15 ### Fixed From e4868f72a022ab4cbf1107d06c8c301fe8250df7 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Fri, 20 Feb 2026 09:43:00 +0100 Subject: [PATCH 8/9] Upgrade grisp_tools --- rebar.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rebar.lock b/rebar.lock index cbf1b8f..0c925a6 100644 --- a/rebar.lock +++ b/rebar.lock @@ -4,8 +4,8 @@ {<<"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.0">>},0}, - {<<"grisp_update_packager">>,{pkg,<<"grisp_update_packager">>,<<"1.0.1">>},1}, + {<<"grisp_tools">>,{pkg,<<"grisp_tools">>,<<"2.8.1">>},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}, {<<"mapz">>,{pkg,<<"mapz">>,<<"2.4.0">>},1}, @@ -25,8 +25,8 @@ {<<"edifa">>, <<"0F1A01A0C79B7135F334B3FCEEB624F0574C5ED3E4554B06C8664AADA6A339C8">>}, {<<"erlexec">>, <<"76D0BC7487929741B5BB9F74DA2AF5DAF1492134733CF9A05C7AAA278B6934C5">>}, {<<"grid">>, <<"4DCBF6155AB24131CB493D417F28093F019197ED7401F28BF82FF60E2C9B0D2C">>}, - {<<"grisp_tools">>, <<"23CF651214F1885B98325B8340E2CC4591785399FA0B4D5B291D0E66F07F1AD7">>}, - {<<"grisp_update_packager">>, <<"4548C7A5E0D4EBED0052E49F87E836D5A5C75FFDB76E793FDBDF5D11409CCBBE">>}, + {<<"grisp_tools">>, <<"8E882F0D75695B9EFF5AB4BC1E076246086D87DA095D5114F43451D11A2EE101">>}, + {<<"grisp_update_packager">>, <<"A74922B6602159A6718B1EE13045D3866BFF26D6A49C8C7A8EABC5F352E41BB9">>}, {<<"hackney">>, <<"8D97AEC62DDDDD757D128BFD1DF6C5861093419F8F7A4223823537BAD5D064E2">>}, {<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>}, {<<"mapz">>, <<"77A8E38B69BAB16C5D3EBD44E6C619F8AF1F1598B0CAAE301D266605A0865756">>}, @@ -45,8 +45,8 @@ {<<"edifa">>, <<"A1E010561E7D236A24C668D95626BE2BFE082ED0331CE1E6798BE0CD43F59A7B">>}, {<<"erlexec">>, <<"AF2DD940BB8E32F5AA40A65CB455DCAA18F5334FD3507E9BFD14A021E9630897">>}, {<<"grid">>, <<"C8EA819A0E40631BECE3149FBA7D306DF6CF8BC35358089878F05B20E6D87D4C">>}, - {<<"grisp_tools">>, <<"0BA58D7C99010BEE9F599D9555B4FC0D75969C92995162CB0B12AF13DAF34692">>}, - {<<"grisp_update_packager">>, <<"B958039BEAD404A5E05D56E904B70C840F10F188070CFBFF0A9ADC92DE9E5451">>}, + {<<"grisp_tools">>, <<"D761A141D96B03FE182937434DE96D325923126F50606A0ADDE64864C5F469F7">>}, + {<<"grisp_update_packager">>, <<"6484C6910C7F4CF235119206A5FEFD16ED08BE2D3A16E62EC1820A207B4D5B20">>}, {<<"hackney">>, <<"FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3">>}, {<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>}, {<<"mapz">>, <<"4B68DF5CF0522E0D6545DF7B681BC052865CDB78405AD4CC9C55FE45EE7B25BE">>}, From fc7550bc98b446b0929d00a301c00412da3b9d12 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Fri, 20 Feb 2026 11:09:03 +0100 Subject: [PATCH 9/9] Deprecate OTP 26, and warn the user about it. --- CHANGELOG.md | 2 ++ rebar.config.script | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2092315..6260bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - the option `--destination` is ignored when using option `--tar` +- Erlang/OTP-26 and older versions are now deprecated. A warning message will be print to inform trhe user. + ### Fixed - `rebar3 grisp firmware` command failure with latest rebar versions diff --git a/rebar.config.script b/rebar.config.script index aee4858..661faf6 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -16,6 +16,9 @@ end. case OTPVersion of V when V < 27 -> + rebar_api:warn("You are running rebar3_grisp with Erlang/OTP-~p!~n" + "rebar3_grisp deprecates this OTP version and will drop support for it in the next releases!~n" + "Please upgrade to OTP 27 or newer before upgrading this plugin!",[OTPVersion]), NewOverrrides = {overrides, [EdifaOverride | Overrides]}, lists:keystore(overrides, 1, CONFIG, NewOverrrides); _ ->