Skip to content

Commit

Permalink
Merge pull request #14 from JimMoen/feat-hidden-plugin
Browse files Browse the repository at this point in the history
feat: plugin hidden field
  • Loading branch information
terry-xiaoyu authored Jul 22, 2024
2 parents d7a744d + 01d882a commit d0f4e5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/emqx_plugrel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down Expand Up @@ -65,6 +66,8 @@ 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).

Expand Down Expand Up @@ -214,6 +217,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);
Expand Down

0 comments on commit d0f4e5b

Please sign in to comment.