From 625149f1b2a213f985100541a648f59c6cf2a32d Mon Sep 17 00:00:00 2001 From: JimMoen Date: Mon, 22 Jul 2024 11:31:07 +0800 Subject: [PATCH 1/2] feat: hidden plugin field --- src/emqx_plugrel.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/emqx_plugrel.erl b/src/emqx_plugrel.erl index 70625c4..cdf32ea 100644 --- a/src/emqx_plugrel.erl +++ b/src/emqx_plugrel.erl @@ -65,6 +65,7 @@ collect_info(PluginInfo, Name, Version, Apps, State) -> , metadata_vsn => ?METADATA_VSN , built_on_otp_release => bin(erlang:system_info(otp_release)) , with_config_schema => filelib:is_regular(?plugin_avsc_file) + , hidden => bin(maps:get(hidden, Info, false)) }, maps:merge(Info, MoreInfo). @@ -214,6 +215,7 @@ validate_i18n(F) -> error({failed_to_validate_i18n_file, F}) end. +bin(A) when is_atom(A) -> atom_to_binary(A, utf8); bin(X) -> unicode:characters_to_binary(X, utf8). info_field(compatibility, Cs) -> info_map(Cs); From 01d882ad6036fb31dc6a64cb2a256951d113ffe3 Mon Sep 17 00:00:00 2001 From: JimMoen Date: Mon, 22 Jul 2024 13:49:49 +0800 Subject: [PATCH 2/2] chore: bump `metadata_vsn` and `emqx_plugrel_vsn` in `release.json` --- src/emqx_plugrel.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/emqx_plugrel.erl b/src/emqx_plugrel.erl index cdf32ea..0cb6735 100644 --- a/src/emqx_plugrel.erl +++ b/src/emqx_plugrel.erl @@ -4,7 +4,8 @@ -export([init/1, do/1, format_error/1]). --define(METADATA_VSN, <<"0.1.0">>). +-define(METADATA_VSN, <<"0.2.0">>). +-define(PLUG_REL_TAG, <<"0.5.1">>). -define(plugin_readme_file, "README.md"). -define(plugin_avsc_file, "priv/config_schema.avsc"). @@ -65,6 +66,7 @@ collect_info(PluginInfo, Name, Version, Apps, State) -> , metadata_vsn => ?METADATA_VSN , built_on_otp_release => bin(erlang:system_info(otp_release)) , with_config_schema => filelib:is_regular(?plugin_avsc_file) + , emqx_plugrel_vsn => ?PLUG_REL_TAG , hidden => bin(maps:get(hidden, Info, false)) }, maps:merge(Info, MoreInfo).