beam hooks: add targeted auxiliary hook opt-outs

Assisted-By: OpenAI Codex GPT-6 Astra
This commit is contained in:
Adam C. Stephens
2026-09-15 00:53:53 -04:00
parent eb7233903a
commit 5cfa15f65b
6 changed files with 18 additions and 6 deletions

View File

@@ -13,4 +13,6 @@ beamCopySourceHook() {
echo "Finished beamCopySourceHook"
}
postPatchHooks+=(beamCopySourceHook)
if [ -z "${dontBeamCopySource-}" ]; then
postPatchHooks+=(beamCopySourceHook)
fi

View File

@@ -16,4 +16,6 @@ mixAppConfigPatchHook() {
echo "Finished mixAppConfigPatchHook"
}
prePatchHooks+=(mixAppConfigPatchHook)
if [ -z "${dontMixAppConfigPatch-}" ]; then
prePatchHooks+=(mixAppConfigPatchHook)
fi

View File

@@ -14,4 +14,6 @@ mixDepsCompileHook() {
echo "Finished mixDepsCompileHook"
}
postConfigureHooks+=(mixDepsCompileHook)
if [ -z "${dontMixDepsCompile-}" ]; then
postConfigureHooks+=(mixDepsCompileHook)
fi

View File

@@ -21,7 +21,9 @@ mixEscriptInstall() {
echo "Finished mixEscriptInstall"
}
postBuildHooks+=(mixEscriptBuild)
if [ -z "${dontMixEscriptBuild-}" ]; then
postBuildHooks+=(mixEscriptBuild)
fi
if [ -z "${dontMixEscriptInstall-}" ] && [ -z "${installPhase-}" ]; then
installPhase=mixEscriptInstall

View File

@@ -74,7 +74,9 @@ mixReleaseStripDebugHook() {
erl -noinput -eval 'lists:foreach(fun(F) -> io:format("Stripping ~p.~n", [F]), beam_lib:strip(F) end, filelib:wildcard("'"$out"'/**/*.beam"))' -s init stop
}
preFixupHooks+=(mixReleaseFixupHook)
if [ -z "${dontMixReleaseFixup-}" ]; then
preFixupHooks+=(mixReleaseFixupHook)
fi
if [ -n "${removeCookie-1}" ]; then
preFixupHooks+=(mixReleaseRemoveCookieHook)

View File

@@ -10,4 +10,6 @@ rebarDevendorPatchHook() {
echo "Finished rebarDevendorPatchHook"
}
prePatchHooks+=(rebarDevendorPatchHook)
if [ -z "${dontRebarDevendorPatch-}" ]; then
prePatchHooks+=(rebarDevendorPatchHook)
fi