Skip to content

Commit

Permalink
Merge pull request #1364 from jacmet/feature/shell-json-add-bundle-fo…
Browse files Browse the repository at this point in the history
…rmat

add bundle format to shell and json output of rauc info
  • Loading branch information
jluebbe committed Mar 28, 2024
2 parents ec9ab08 + 0bac6ff commit 2f4d328
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ static gchar *info_formatter_shell(RaucManifest *manifest)
formatter_shell_append(text, "RAUC_MF_DESCRIPTION", manifest->update_description);
formatter_shell_append(text, "RAUC_MF_BUILD", manifest->update_build);
formatter_shell_append(text, "RAUC_MF_HASH", manifest->hash);
formatter_shell_append(text, "RAUC_MF_FORMAT", r_manifest_bundle_format_to_str(manifest->bundle_format));
g_string_append_printf(text, "RAUC_MF_IMAGES=%d\n", g_list_length(manifest->images));

hooks = g_ptr_array_new();
Expand Down Expand Up @@ -1124,6 +1125,9 @@ static gchar* info_formatter_json_base(RaucManifest *manifest, gboolean pretty)
json_builder_set_member_name(builder, "build");
json_builder_add_string_value(builder, manifest->update_build);

json_builder_set_member_name(builder, "format");
json_builder_add_string_value(builder, r_manifest_bundle_format_to_str(manifest->bundle_format));

json_builder_set_member_name(builder, "hooks");
json_builder_begin_array(builder);
if (manifest->hooks.install_check == TRUE) {
Expand Down

0 comments on commit 2f4d328

Please sign in to comment.