2024-06-07 13:27:13 +00:00
|
|
|
yarnBuildHook() {
|
|
|
|
runHook preBuild
|
|
|
|
echo "Executing yarnBuildHook"
|
|
|
|
|
|
|
|
if [ -z "${yarnBuildScript-}" ]; then
|
|
|
|
yarnBuildScript="build"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! type node > /dev/null 2>&1 ; then
|
|
|
|
echo yarnConfigHook WARNING: a node interpreter was not added to the \
|
|
|
|
build, and is probably required to run \'yarn $yarnBuildHook\'. \
|
|
|
|
A common symptom of this is getting \'command not found\' errors \
|
|
|
|
for Nodejs related tools.
|
|
|
|
fi
|
|
|
|
|
2024-07-03 07:46:01 +00:00
|
|
|
yarn --offline "$yarnBuildScript" $yarnBuildFlags
|
2024-06-07 13:27:13 +00:00
|
|
|
|
|
|
|
echo "finished yarnBuildHook"
|
|
|
|
runHook postBuild
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z "${dontYarnBuild-}" && -z "${buildPhase-}" ]]; then
|
|
|
|
buildPhase=yarnBuildHook
|
|
|
|
fi
|