refactor: always use hocon to generate config

previously we supports skipping config generation if USE_CUTTLEFISH
not set to true.
it has never been tested (at least not in automated tests)
now it's time to drop it.
This commit is contained in:
Zaiming Shi 2021-05-28 14:12:03 +02:00 committed by z8674558
parent 4b174b0277
commit 5546d24b6d
1 changed files with 38 additions and 50 deletions

View File

@ -123,9 +123,6 @@ fi
# Echo to stderr on errors
echoerr() { echo "$@" 1>&2; }
# By default, use hocon to generate app.config and vm.args
HOCON="${USE_HOCON:-yes}"
SED_REPLACE="sed -i "
case $(sed --help 2>&1) in
*GNU*) SED_REPLACE="sed -i ";;
@ -202,14 +199,6 @@ generate_config() {
## changing the config 'log.rotation.size'
rm -rf "${RUNNER_LOG_DIR}"/*.siz
if [ "$HOCON" != "yes" ]; then
# Note: we have added a parameter '-vm_args' to this. It
# appears redundant but it is not! the erlang vm allows us to
# access all arguments to the erl command EXCEPT '-args_file',
# so in order to get access to this file location from within
# the vm, we need to pass it in twice.
CONFIG_ARGS=" -config $RUNNER_ETC_DIR/app.config -args_file $RUNNER_ETC_DIR/vm.args -vm_args $RUNNER_ETC_DIR/vm.args "
else
EMQX_LICENSE_CONF_OPTION=""
if [ "${EMQX_LICENSE_CONF:-}" != "" ]; then
EMQX_LICENSE_CONF_OPTION="-i ${EMQX_LICENSE_CONF}"
@ -249,7 +238,6 @@ generate_config() {
fi
done
mv -f "$TMP_ARG_FILE" "$HOCON_GEN_ARG_FILE"
fi
# shellcheck disable=SC2086
if ! relx_nodetool chkconfig $CONFIG_ARGS; then