mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
bugfix: run 'node translate.js extractall' only when DISABLE_TRANSLATE is not set
This commit is contained in:
parent
d06ca601ff
commit
cf553d1a0f
4 changed files with 39 additions and 25 deletions
|
@ -3,13 +3,16 @@
|
|||
MSG="";
|
||||
PRUNE="false";
|
||||
|
||||
LOG_FILE=""
|
||||
#LOG_FILE="$(dirname -- "$( readlink -f -- "$0"; )")/build.log";
|
||||
|
||||
function appendOutput()
|
||||
{
|
||||
if [ -z "${MSG}" ]; then echo -e "\n" > /dev/tty; fi
|
||||
|
||||
ARGS=$@;
|
||||
LINE="${ARGS}\n"
|
||||
echo -e "${LINE}" > /dev/tty;
|
||||
LINE="${ARGS}\n";
|
||||
if [ -z "${LOG_FILE}" ]; then echo -e "${LINE}" > /dev/tty; else echo -e "${LINE}" &>> "${LOG_FILE}"; fi
|
||||
|
||||
MSG="${MSG}${LINE}";
|
||||
}
|
||||
|
@ -24,7 +27,7 @@ function runDockerBuild()
|
|||
BUILD_CMD="docker build -f docker/Dockerfile --force-rm --no-cache ${ARGS} -t meshcentral .";
|
||||
appendOutput "Current build: ${BUILD_CMD}";
|
||||
|
||||
${BUILD_CMD};
|
||||
if [ -z "${LOG_FILE}" ]; then ${BUILD_CMD}; else ${BUILD_CMD} &>> "${LOG_FILE}"; fi
|
||||
if [ $? -ne 0 ]; then exit $?; fi
|
||||
|
||||
ENDTS=$(date +%s);
|
||||
|
@ -42,15 +45,12 @@ function runDockerBuild()
|
|||
else appendOutput "\tBuild time: ${DIFSEC} sec"; fi
|
||||
|
||||
IMG_SIZE=$(docker image inspect meshcentral | grep -e "\"Size\"" | tr -d '",' | sed -E "s/\s*Size:\s*//");
|
||||
expr $IMG_SIZE + 0;
|
||||
appendOutput "\tImage size: ${IMG_SIZE} ($((${IMG_SIZE}/1024/1024))M)";
|
||||
|
||||
appendOutput "\n";
|
||||
expr $IMG_SIZE + 0 > /dev/null;
|
||||
appendOutput "\tImage size: ${IMG_SIZE} ($((${IMG_SIZE}/1024/1024))M)\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
parent_path=$(dirname -- $(dirname -- "$( readlink -f -- "$0"; )"));
|
||||
if [ "${parent_path}" != "$(pwd -P)" ]; then
|
||||
echo -e "change working directory to: ${parent_path}" > /dev/tty;
|
||||
|
@ -59,17 +59,17 @@ fi
|
|||
|
||||
if ! [ -z $1 ] && [ "${1}" == "prune" ]; then PRUNE="true"; fi
|
||||
|
||||
runDockerBuild;
|
||||
#runDockerBuild --build-arg DISABLE_MINIFY=yes;
|
||||
#runDockerBuild --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg DISABLE_MINIFY=yes --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg DISABLE_MINIFY=yes;
|
||||
runDockerBuild;
|
||||
|
||||
#runDockerBuild --build-arg INCLUDE_MONGOTOOLS=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGOTOOLS=yes --build-arg DISABLE_MINIFY=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGOTOOLS=yes --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGOTOOLS=yes --build-arg DISABLE_MINIFY=yes --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGODBTOOLS=yes --build-arg DISABLE_MINIFY=yes --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGODBTOOLS=yes --build-arg DISABLE_TRANSLATE=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGODBTOOLS=yes --build-arg DISABLE_MINIFY=yes;
|
||||
#runDockerBuild --build-arg INCLUDE_MONGODBTOOLS=yes;
|
||||
|
||||
echo "";
|
||||
echo -e $MSG;
|
||||
echo -e "${MSG}";
|
||||
|
||||
exit 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue