diff --git a/Makefile b/Makefile index 40d3c325c..91490e416 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ PROFILE ?= emqx PROFILES := emqx emqx-edge PKG_PROFILES := emqx-pkg emqx-edge-pkg +export REBAR_GIT_CLONE_OPTIONS=--depth=1 + .PHONY: default default: $(REBAR) $(PROFILE) diff --git a/apps/emqx/src/emqx.app.src b/apps/emqx/src/emqx.app.src index 698e45b92..b26b7dcd7 100644 --- a/apps/emqx/src/emqx.app.src +++ b/apps/emqx/src/emqx.app.src @@ -1,7 +1,7 @@ {application, emqx, [{description, "EMQ X Broker"}, {id, "emqx"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,gproc,gen_rpc,esockd,cowboy,sasl,os_mon,emqx_libs]}, diff --git a/apps/emqx/src/emqx.app.src.script b/apps/emqx/src/emqx.app.src.script deleted file mode 100644 index ad78864a1..000000000 --- a/apps/emqx/src/emqx.app.src.script +++ /dev/null @@ -1,33 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -Config = case os:getenv("EMQX_DESC") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Desc -> - [begin - AppConf0 = lists:keystore(description, 1, AppConf, {description, Desc}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end, - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> Config; % env var not defined - [] -> Config; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- Config] -end. diff --git a/apps/emqx/test/emqx_plugins_SUITE_data/emqx_mini_plugin/src/emqx_mini_plugin.app.src b/apps/emqx/test/emqx_plugins_SUITE_data/emqx_mini_plugin/src/emqx_mini_plugin.app.src index 20e17efda..413b4e1fd 100644 --- a/apps/emqx/test/emqx_plugins_SUITE_data/emqx_mini_plugin/src/emqx_mini_plugin.app.src +++ b/apps/emqx/test/emqx_plugins_SUITE_data/emqx_mini_plugin/src/emqx_mini_plugin.app.src @@ -1,6 +1,6 @@ {application, emqx_mini_plugin, [{description, "An EMQ X plugin for testcase"}, - {vsn, "git"}, + {vsn, "0.1"}, {modules, []}, {registered, []}, {mod, {emqx_mini_plugin_app, []}}, diff --git a/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src b/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src index 96afbca38..cf96e6eca 100644 --- a/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src +++ b/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_clientid, [{description, "EMQ X Authentication with ClientId/Password"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_clientid_sup]}, {applications, [kernel,stdlib,minirest,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src.script b/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_clientid/src/emqx_auth_clientid.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_http/src/emqx_auth_http.app.src b/apps/emqx_auth_http/src/emqx_auth_http.app.src index 00db7e94a..1a74b33ac 100644 --- a/apps/emqx_auth_http/src/emqx_auth_http.app.src +++ b/apps/emqx_auth_http/src/emqx_auth_http.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_http, [{description, "EMQ X Authentication/ACL with HTTP API"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_http_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_auth_http/src/emqx_auth_http.app.src.script b/apps/emqx_auth_http/src/emqx_auth_http.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_http/src/emqx_auth_http.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src b/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src index 0ec50d825..e89ac458d 100644 --- a/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src +++ b/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_jwt, [{description, "EMQ X Authentication with JWT"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_jwt_sup]}, {applications, [kernel,stdlib,jwerl,emqx_libs]}, diff --git a/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src.script b/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_jwt/src/emqx_auth_jwt.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src b/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src index 9c15ef3ff..802920c3e 100644 --- a/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src +++ b/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_ldap, [{description, "EMQ X Authentication/ACL with LDAP"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_ldap_sup,emqx_libs]}, {applications, [kernel,stdlib,eldap2,ecpool,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src.script b/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_ldap/src/emqx_auth_ldap.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src b/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src index 62241e255..c1e4aec18 100644 --- a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src +++ b/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_mnesia, [{description, "EMQ X Authentication with Mnesia"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,mnesia,emqx_libs]}, diff --git a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src.script b/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src b/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src index 50a967c95..a33184809 100644 --- a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src +++ b/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_mongo, [{description, "EMQ X Authentication/ACL with MongoDB"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_mongo_sup]}, {applications, [kernel,stdlib,mongodb,ecpool,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src.script b/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_mongo/src/emqx_auth_mongo.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src b/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src index 89ec8ba54..89f2822f9 100644 --- a/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src +++ b/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_mysql, [{description, "EMQ X Authentication/ACL with MySQL"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_mysql_sup]}, {applications, [kernel,stdlib,mysql,ecpool,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src.script b/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_mysql/src/emqx_auth_mysql.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src b/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src index 000d7d105..2bc948f3f 100644 --- a/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src +++ b/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_pgsql, [{description, "EMQ X Authentication/ACL with PostgreSQL"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_pgsql_sup]}, {applications, [kernel,stdlib,epgsql,ecpool,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src.script b/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_pgsql/src/emqx_auth_pgsql.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_redis/src/emqx_auth_redis.app.src b/apps/emqx_auth_redis/src/emqx_auth_redis.app.src index bd2e0be30..24cac879b 100644 --- a/apps/emqx_auth_redis/src/emqx_auth_redis.app.src +++ b/apps/emqx_auth_redis/src/emqx_auth_redis.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_redis, [{description, "EMQ X Authentication/ACL with Redis"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_auth_redis_sup]}, {applications, [kernel,stdlib,eredis,eredis_cluster,ecpool,emqx_passwd,emqx_libs]}, diff --git a/apps/emqx_auth_redis/src/emqx_auth_redis.app.src.script b/apps/emqx_auth_redis/src/emqx_auth_redis.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_redis/src/emqx_auth_redis.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_auth_username/src/emqx_auth_username.app.src b/apps/emqx_auth_username/src/emqx_auth_username.app.src index 83ef521ab..c48c1de24 100644 --- a/apps/emqx_auth_username/src/emqx_auth_username.app.src +++ b/apps/emqx_auth_username/src/emqx_auth_username.app.src @@ -1,6 +1,6 @@ {application, emqx_auth_username, [{description, "EMQ X Authentication with Username and Password"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_auth_username/src/emqx_auth_username.app.src.script b/apps/emqx_auth_username/src/emqx_auth_username.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_auth_username/src/emqx_auth_username.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src b/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src index 14dca2d9f..c8662b3fd 100644 --- a/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src +++ b/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src @@ -1,6 +1,6 @@ {application, emqx_bridge_mqtt, [{description, "EMQ X Bridge to MQTT Broker"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,replayq,emqtt,emqx_libs]}, diff --git a/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src.script b/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_bridge_mqtt/src/emqx_bridge_mqtt.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_coap/src/emqx_coap.app.src b/apps/emqx_coap/src/emqx_coap.app.src index 5c75085a6..a47d62980 100644 --- a/apps/emqx_coap/src/emqx_coap.app.src +++ b/apps/emqx_coap/src/emqx_coap.app.src @@ -1,6 +1,6 @@ {application, emqx_coap, [{description, "EMQ X CoAP Gateway"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,gen_coap,emqx_libs]}, diff --git a/apps/emqx_coap/src/emqx_coap.app.src.script b/apps/emqx_coap/src/emqx_coap.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_coap/src/emqx_coap.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_dashboard/src/emqx_dashboard.app.src b/apps/emqx_dashboard/src/emqx_dashboard.app.src index 6280e67ae..587956ce5 100644 --- a/apps/emqx_dashboard/src/emqx_dashboard.app.src +++ b/apps/emqx_dashboard/src/emqx_dashboard.app.src @@ -1,6 +1,6 @@ {application, emqx_dashboard, [{description, "EMQ X Web Dashboard"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_dashboard_sup]}, {applications, [kernel,stdlib,mnesia,minirest,emqx_libs]}, diff --git a/apps/emqx_dashboard/src/emqx_dashboard.app.src.script b/apps/emqx_dashboard/src/emqx_dashboard.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_dashboard/src/emqx_dashboard.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_exhook/src/emqx_exhook.app.src b/apps/emqx_exhook/src/emqx_exhook.app.src index e91359178..f9afcda17 100644 --- a/apps/emqx_exhook/src/emqx_exhook.app.src +++ b/apps/emqx_exhook/src/emqx_exhook.app.src @@ -1,6 +1,6 @@ {application, emqx_exhook, [{description, "EMQ X Extension for Hook"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {mod, {emqx_exhook_app, []}}, diff --git a/apps/emqx_exproto/src/emqx_exproto.app.src b/apps/emqx_exproto/src/emqx_exproto.app.src index 2824202d7..7e0de82d4 100644 --- a/apps/emqx_exproto/src/emqx_exproto.app.src +++ b/apps/emqx_exproto/src/emqx_exproto.app.src @@ -1,6 +1,6 @@ {application, emqx_exproto, [{description, "EMQ X Extension for Protocol"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {mod, {emqx_exproto_app, []}}, diff --git a/apps/emqx_lua_hook/src/emqx_lua_hook.app.src b/apps/emqx_lua_hook/src/emqx_lua_hook.app.src index b47669a4d..aee084902 100644 --- a/apps/emqx_lua_hook/src/emqx_lua_hook.app.src +++ b/apps/emqx_lua_hook/src/emqx_lua_hook.app.src @@ -1,6 +1,6 @@ {application, emqx_lua_hook, [{description, "EMQ X Lua Hooks"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_lua_hook/src/emqx_lua_hook.app.src.script b/apps/emqx_lua_hook/src/emqx_lua_hook.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_lua_hook/src/emqx_lua_hook.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_lwm2m/src/emqx_lwm2m.app.src b/apps/emqx_lwm2m/src/emqx_lwm2m.app.src index 39da9f5e4..dd5c49d00 100644 --- a/apps/emqx_lwm2m/src/emqx_lwm2m.app.src +++ b/apps/emqx_lwm2m/src/emqx_lwm2m.app.src @@ -1,6 +1,6 @@ {application,emqx_lwm2m, [{description,"EMQ X LwM2M Gateway"}, - {vsn,"git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules,[]}, {registered,[emqx_lwm2m_sup]}, {applications,[kernel,stdlib,lwm2m_coap,emqx_libs]}, diff --git a/apps/emqx_lwm2m/src/emqx_lwm2m.app.src.script b/apps/emqx_lwm2m/src/emqx_lwm2m.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_lwm2m/src/emqx_lwm2m.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_management/src/emqx_management.app.src b/apps/emqx_management/src/emqx_management.app.src index 308cf205a..09309af42 100644 --- a/apps/emqx_management/src/emqx_management.app.src +++ b/apps/emqx_management/src/emqx_management.app.src @@ -1,6 +1,6 @@ {application, emqx_management, [{description, "EMQ X Management API and CLI"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_management_sup]}, {applications, [kernel,stdlib,minirest,emqx_libs]}, diff --git a/apps/emqx_management/src/emqx_management.app.src.script b/apps/emqx_management/src/emqx_management.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_management/src/emqx_management.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_passwd/src/emqx_passwd.app.src b/apps/emqx_passwd/src/emqx_passwd.app.src index dcfa17aa4..521af1e95 100644 --- a/apps/emqx_passwd/src/emqx_passwd.app.src +++ b/apps/emqx_passwd/src/emqx_passwd.app.src @@ -1,6 +1,6 @@ {application, emqx_passwd, [{description, "Password Hash Library for EMQ X Broker"}, - {vsn, "0.1"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, ['emqx_passwd']}, {registered, []}, {applications, [kernel,stdlib,ssl,pbkdf2,bcrypt]}, diff --git a/apps/emqx_passwd/src/emqx_passwd.app.src.script b/apps/emqx_passwd/src/emqx_passwd.app.src.script deleted file mode 100644 index c93f83caf..000000000 --- a/apps/emqx_passwd/src/emqx_passwd.app.src.script +++ /dev/null @@ -1,14 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -Config = case os:type() =:= {win32, nt} orelse os:getenv("EMQX_DESC") =:= "EMQ X Edge" of - true -> - [begin - Applications0 = proplists:get_value(applications, AppConf), - Applications = Applications0 -- [bcrypt], - AppConf0 = lists:keystore(applications, 1, AppConf, {applications, Applications}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG]; - false -> - CONFIG -end. diff --git a/apps/emqx_plugin_template/src/emqx_plugin_template.app.src b/apps/emqx_plugin_template/src/emqx_plugin_template.app.src index a4e6c3f63..c63de21c1 100644 --- a/apps/emqx_plugin_template/src/emqx_plugin_template.app.src +++ b/apps/emqx_plugin_template/src/emqx_plugin_template.app.src @@ -1,6 +1,6 @@ {application, emqx_plugin_template, [{description, "EMQ X Plugin Template"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_plugin_template_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_plugin_template/src/emqx_plugin_template.app.src.script b/apps/emqx_plugin_template/src/emqx_plugin_template.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_plugin_template/src/emqx_plugin_template.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_prometheus/src/emqx_prometheus.app.src b/apps/emqx_prometheus/src/emqx_prometheus.app.src index 452547b90..b70c90afe 100644 --- a/apps/emqx_prometheus/src/emqx_prometheus.app.src +++ b/apps/emqx_prometheus/src/emqx_prometheus.app.src @@ -1,6 +1,6 @@ {application, emqx_prometheus, [{description, "Prometheus for EMQ X"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_prometheus_sup]}, {applications, [kernel,stdlib,prometheus,emqx_libs]}, diff --git a/apps/emqx_prometheus/src/emqx_prometheus.app.src.script b/apps/emqx_prometheus/src/emqx_prometheus.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_prometheus/src/emqx_prometheus.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_psk_file/src/emqx_psk_file.app.src b/apps/emqx_psk_file/src/emqx_psk_file.app.src index d6381f87e..5bf79204c 100644 --- a/apps/emqx_psk_file/src/emqx_psk_file.app.src +++ b/apps/emqx_psk_file/src/emqx_psk_file.app.src @@ -1,6 +1,6 @@ {application, emqx_psk_file, [{description,"EMQX PSK Plugin from File"}, - {vsn,"git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules,[]}, {registered,[emqx_psk_file_sup]}, {applications,[kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_psk_file/src/emqx_psk_file.app.src.script b/apps/emqx_psk_file/src/emqx_psk_file.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_psk_file/src/emqx_psk_file.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_recon/src/emqx_recon.app.src b/apps/emqx_recon/src/emqx_recon.app.src index fc3ef4d42..55f21026a 100644 --- a/apps/emqx_recon/src/emqx_recon.app.src +++ b/apps/emqx_recon/src/emqx_recon.app.src @@ -1,6 +1,6 @@ {application, emqx_recon, [{description, "EMQ X Recon Plugin"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,recon,emqx_libs]}, diff --git a/apps/emqx_recon/src/emqx_recon.app.src.script b/apps/emqx_recon/src/emqx_recon.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_recon/src/emqx_recon.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_retainer/src/emqx_retainer.app.src b/apps/emqx_retainer/src/emqx_retainer.app.src index f1acc3c3c..4fbe085c0 100644 --- a/apps/emqx_retainer/src/emqx_retainer.app.src +++ b/apps/emqx_retainer/src/emqx_retainer.app.src @@ -1,6 +1,6 @@ {application, emqx_retainer, [{description, "EMQ X Retainer"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_retainer_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_retainer/src/emqx_retainer.app.src.script b/apps/emqx_retainer/src/emqx_retainer.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_retainer/src/emqx_retainer.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_rule_engine/src/emqx_rule_engine.app.src b/apps/emqx_rule_engine/src/emqx_rule_engine.app.src index fe90b4c40..b7b735aa7 100644 --- a/apps/emqx_rule_engine/src/emqx_rule_engine.app.src +++ b/apps/emqx_rule_engine/src/emqx_rule_engine.app.src @@ -1,6 +1,6 @@ {application, emqx_rule_engine, [{description, "EMQ X Rule Engine"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_rule_engine_sup, emqx_rule_registry]}, {applications, [kernel,stdlib,rulesql,getopt,emqx_libs]}, diff --git a/apps/emqx_rule_engine/src/emqx_rule_engine.app.src.script b/apps/emqx_rule_engine/src/emqx_rule_engine.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_rule_engine/src/emqx_rule_engine.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_sasl/src/emqx_sasl.app.src b/apps/emqx_sasl/src/emqx_sasl.app.src index 64c938bc9..3bf54052c 100644 --- a/apps/emqx_sasl/src/emqx_sasl.app.src +++ b/apps/emqx_sasl/src/emqx_sasl.app.src @@ -1,6 +1,6 @@ {application, emqx_sasl, [{description, "EMQ X SASL"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_sasl_sup]}, {applications, [kernel,stdlib,pbkdf2,emqx_libs]}, diff --git a/apps/emqx_sn/src/emqx_sn.app.src b/apps/emqx_sn/src/emqx_sn.app.src index 97ef7af86..8db80e927 100644 --- a/apps/emqx_sn/src/emqx_sn.app.src +++ b/apps/emqx_sn/src/emqx_sn.app.src @@ -1,6 +1,6 @@ {application, emqx_sn, [{description, "EMQ X MQTT-SN Plugin"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, []}, {applications, [kernel,stdlib,esockd,emqx_libs]}, diff --git a/apps/emqx_sn/src/emqx_sn.app.src.script b/apps/emqx_sn/src/emqx_sn.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_sn/src/emqx_sn.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_stomp/src/emqx_stomp.app.src b/apps/emqx_stomp/src/emqx_stomp.app.src index 196bcfecc..1d34407f1 100644 --- a/apps/emqx_stomp/src/emqx_stomp.app.src +++ b/apps/emqx_stomp/src/emqx_stomp.app.src @@ -1,6 +1,6 @@ {application, emqx_stomp, [{description, "EMQ X Stomp Protocol Plugin"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_stomp_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_stomp/src/emqx_stomp.app.src.script b/apps/emqx_stomp/src/emqx_stomp.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_stomp/src/emqx_stomp.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/apps/emqx_telemetry/src/emqx_telemetry.app.src b/apps/emqx_telemetry/src/emqx_telemetry.app.src index 874ac7949..8956bbdb2 100644 --- a/apps/emqx_telemetry/src/emqx_telemetry.app.src +++ b/apps/emqx_telemetry/src/emqx_telemetry.app.src @@ -1,6 +1,6 @@ {application, emqx_telemetry, [{description, "EMQ X Telemetry"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_telemetry_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_web_hook/src/emqx_web_hook.app.src b/apps/emqx_web_hook/src/emqx_web_hook.app.src index ae7278ecd..ded41bd2b 100644 --- a/apps/emqx_web_hook/src/emqx_web_hook.app.src +++ b/apps/emqx_web_hook/src/emqx_web_hook.app.src @@ -1,6 +1,6 @@ {application, emqx_web_hook, [{description, "EMQ X WebHook Plugin"}, - {vsn, "git"}, + {vsn, "5.0.0"}, % strict semver, bump manually! {modules, []}, {registered, [emqx_web_hook_sup]}, {applications, [kernel,stdlib,emqx_libs]}, diff --git a/apps/emqx_web_hook/src/emqx_web_hook.app.src.script b/apps/emqx_web_hook/src/emqx_web_hook.app.src.script deleted file mode 100644 index 0e14ff23f..000000000 --- a/apps/emqx_web_hook/src/emqx_web_hook.app.src.script +++ /dev/null @@ -1,24 +0,0 @@ -%%-*- mode: erlang -*- -%% .app.src.script - -RemoveLeadingV = - fun(Tag) -> - case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of - nomatch -> - re:replace(Tag, "/", "-", [{return ,list}]); - _ -> - %% if it is a version number prefixed by 'v' or 'e', then remove it - re:replace(Tag, "[v|e]", "", [{return ,list}]) - end - end, - -case os:getenv("EMQX_DEPS_DEFAULT_VSN") of - false -> CONFIG; % env var not defined - [] -> CONFIG; % env var set to empty string - Tag -> - [begin - AppConf0 = lists:keystore(vsn, 1, AppConf, {vsn, RemoveLeadingV(Tag)}), - {application, App, AppConf0} - end || Conf = {application, App, AppConf} <- CONFIG] -end. - diff --git a/mods/mod_project.erl b/mods/mod_project.erl index ca5b23278..12f443efa 100644 --- a/mods/mod_project.erl +++ b/mods/mod_project.erl @@ -9,7 +9,8 @@ get_vsn(_Conf) -> false -> os:cmd("git describe --tags"); Vsn -> Vsn end, - re:replace(PkgVsn, "v", "", [{return ,list}]). + Vsn2 = re:replace(PkgVsn, "v", "", [{return ,list}]), + re:replace(Vsn2, "\n", "", [{return ,list}]). coveralls_configs(_Config) -> case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of