fix: some sanity-checks
This commit is contained in:
parent
3c8ef35b18
commit
3ad7dc262b
4
Makefile
4
Makefile
|
@ -238,7 +238,7 @@ $(foreach zt,$(ALL_ZIPS),$(eval $(call download-relup-packages,$(zt))))
|
||||||
## relup target is to create relup instructions
|
## relup target is to create relup instructions
|
||||||
.PHONY: $(REL_PROFILES:%=%-relup)
|
.PHONY: $(REL_PROFILES:%=%-relup)
|
||||||
define gen-relup-target
|
define gen-relup-target
|
||||||
$1-relup: $1-relup-downloads $(COMMON_DEPS)
|
$1-relup: $(COMMON_DEPS)
|
||||||
@$(BUILD) $1 relup
|
@$(BUILD) $1 relup
|
||||||
endef
|
endef
|
||||||
ALL_TGZS = $(REL_PROFILES)
|
ALL_TGZS = $(REL_PROFILES)
|
||||||
|
@ -247,7 +247,7 @@ $(foreach zt,$(ALL_TGZS),$(eval $(call gen-relup-target,$(zt))))
|
||||||
## tgz target is to create a release package .tar.gz with relup
|
## tgz target is to create a release package .tar.gz with relup
|
||||||
.PHONY: $(REL_PROFILES:%=%-tgz)
|
.PHONY: $(REL_PROFILES:%=%-tgz)
|
||||||
define gen-tgz-target
|
define gen-tgz-target
|
||||||
$1-tgz: $1-relup
|
$1-tgz: $(COMMON_DEPS)
|
||||||
@$(BUILD) $1 tgz
|
@$(BUILD) $1 tgz
|
||||||
endef
|
endef
|
||||||
ALL_TGZS = $(REL_PROFILES)
|
ALL_TGZS = $(REL_PROFILES)
|
||||||
|
|
|
@ -17,21 +17,21 @@
|
||||||
-module(emqx_post_upgrade).
|
-module(emqx_post_upgrade).
|
||||||
|
|
||||||
%% PR#12765
|
%% PR#12765
|
||||||
-export([
|
% -export([
|
||||||
pr12765_update_stats_timer/1,
|
% pr12765_update_stats_timer/1,
|
||||||
pr12765_revert_stats_timer/1
|
% pr12765_revert_stats_timer/1
|
||||||
]).
|
% ]).
|
||||||
|
|
||||||
-include("logger.hrl").
|
-include("logger.hrl").
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% Hot Upgrade Callback Functions.
|
%% Hot Upgrade Callback Functions.
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
pr12765_update_stats_timer(_FromVsn) ->
|
% pr12765_update_stats_timer(_FromVsn) ->
|
||||||
emqx_stats:update_interval(broker_stats, fun emqx_broker_helper:stats_fun/0).
|
% emqx_stats:update_interval(broker_stats, fun emqx_broker_helper:stats_fun/0).
|
||||||
|
|
||||||
pr12765_revert_stats_timer(_ToVsn) ->
|
% pr12765_revert_stats_timer(_ToVsn) ->
|
||||||
emqx_stats:update_interval(broker_stats, fun emqx_broker:stats_fun/0).
|
% emqx_stats:update_interval(broker_stats, fun emqx_broker:stats_fun/0).
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% Helper functions
|
%% Helper functions
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
'/relup/upgrade/:node'/2
|
'/relup/upgrade/:node'/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
-ignore_xref(emqx_relup_main).
|
||||||
|
|
||||||
-define(TAGS, [<<"Relup">>]).
|
-define(TAGS, [<<"Relup">>]).
|
||||||
-define(NAME_RE, "^[A-Za-z]+[A-Za-z0-9-_.]*$").
|
-define(NAME_RE, "^[A-Za-z]+[A-Za-z0-9-_.]*$").
|
||||||
-define(CONTENT_PACKAGE, plugin).
|
-define(CONTENT_PACKAGE, plugin).
|
||||||
|
|
2
bin/emqx
2
bin/emqx
|
@ -69,7 +69,7 @@ if [ -f "$RUNNER_ROOT_DIR/relup/version" ]; then
|
||||||
TARGET_VSN=$(cat "$RUNNER_ROOT_DIR/relup/version")
|
TARGET_VSN=$(cat "$RUNNER_ROOT_DIR/relup/version")
|
||||||
export BASE_RUNNER_ROOT_DIR
|
export BASE_RUNNER_ROOT_DIR
|
||||||
logwarn "Loading emqx from hot upgrade dir: $RUNNER_ROOT_DIR/relup"
|
logwarn "Loading emqx from hot upgrade dir: $RUNNER_ROOT_DIR/relup"
|
||||||
exec $RUNNER_ROOT_DIR/relup/$TARGET_VSN/bin/emqx "$@"
|
exec "$RUNNER_ROOT_DIR"/relup/"$TARGET_VSN"/bin/emqx "$@"
|
||||||
else
|
else
|
||||||
logdebug "Loading emqx from $RUNNER_ROOT_DIR"
|
logdebug "Loading emqx from $RUNNER_ROOT_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
3
build
3
build
|
@ -212,7 +212,8 @@ make_elixir_rel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
make_relup() {
|
make_relup() {
|
||||||
export RELUP_TARGET_VSN="$(./pkg-vsn.sh "$PROFILE" --long)"
|
RELUP_TARGET_VSN="$(./pkg-vsn.sh "$PROFILE" --long)"
|
||||||
|
export RELUP_TARGET_VSN
|
||||||
./rebar3 emqx relup_gen --relup-dir=./relup
|
./rebar3 emqx relup_gen --relup-dir=./relup
|
||||||
make rel -C _build/default/plugins/emqx_relup
|
make rel -C _build/default/plugins/emqx_relup
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ project_app_excluded("apps/" ++ AppStr, ExcludedApps) ->
|
||||||
|
|
||||||
plugins() ->
|
plugins() ->
|
||||||
[
|
[
|
||||||
{emqx_relup, {git, "https://github.com/emqx/emqx-relup.git", {branch, "0.1.0"}}},
|
{emqx_relup, {git, "https://github.com/emqx/emqx-relup.git", {tag, "0.1.0"}}},
|
||||||
%% emqx main project does not require port-compiler
|
%% emqx main project does not require port-compiler
|
||||||
%% pin at root level for deterministic
|
%% pin at root level for deterministic
|
||||||
{pc, "v1.14.0"}
|
{pc, "v1.14.0"}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[ "5.6.1+patch.A <- 5.6.1 <- 5.6.0"
|
[ "5.6.1+patch.A <- 5.6.1 <- 5.6.0"
|
||||||
, "5.7.0 <- 5.6.1 <- 5.6.0"
|
, "5.7.0 <- 5.6.1 <- 5.6.0"
|
||||||
].
|
].
|
||||||
|
|
Loading…
Reference in New Issue