Skip to content

Commit

Permalink
fix for release_rc_exec, only create mutable dir if it does not exist…
Browse files Browse the repository at this point in the history
…, and replace start_erl.data in var directory if the file in releases dir is newer (bitwalker#718)
  • Loading branch information
delta1 authored and brian-armstrong-discord committed Sep 14, 2021
1 parent f6fd7f9 commit 2ab6d6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion priv/templates/release_rc_exec.eex
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ RELEASE_MUTABLE_DIR="${RELEASE_MUTABLE_DIR:-"${RELEASE_ROOT_DIR}/var"}"
START_ERL_DATA="${RELEASE_MUTABLE_DIR}/start_erl.data"
REL_NAME="${REL_NAME:-<%= release_name %>}"

if [ ! -f "${START_ERL_DATA}" ]; then
if [ ! -d "${RELEASE_MUTABLE_DIR}" ]; then
mkdir -p $RELEASE_MUTABLE_DIR
fi
if [[ "${RELEASES_DIR}/start_erl.data" -nt "${START_ERL_DATA}" ]]; then
cp "${RELEASES_DIR}/start_erl.data" "${START_ERL_DATA}"
fi
REL_VSN="${REL_VSN:-$(cut -d' ' -f2 "${START_ERL_DATA}")}"
Expand Down

0 comments on commit 2ab6d6d

Please sign in to comment.