samgis-lisa-on-zero / scripts /baremetal_entrypoint.sh
alessandro trinca tornidor
[ci] add debug logs about folders creation, add missing pnpm build step in baremetal_entrypoint.sh
37d9063
raw
history blame
784 Bytes
#!/usr/bin/env bash
if [ -z "${WORKDIR}" ];
then
WORKDIR=$1
fi
if [ -z "${XDG_CACHE_HOME}" ];
then
XDG_CACHE_HOME=$HOME/.cache
fi
echo "WORKDIR: ${WORKDIR} ..."
echo "XDG_CACHE_HOME: ${XDG_CACHE_HOME} ..."
cd ${WORKDIR}
if [ ! -f "${WORKDIR}/.env_source" ];
then
echo "missing ${WORKDIR}/.env_source file, exit now..."
exit 1
fi
source ${WORKDIR}/.env_source
echo "FOLDERS_MAP: ${FOLDERS_MAP} ..."
which python
python --version
python ${WORKDIR}/scripts/create_folders_and_variables_if_not_exists.py
cd ${WORKDIR}/static
npm install -g npm pnpm
pnpm install
pnpm build
pnpm tailwindcss -i ${WORKDIR}/static/src/input.css -o ${WORKDIR}/static/dist/output.css
cd ${WORKDIR}
chmod +x ${WORKDIR}/scripts/entrypoint.sh
bash ${WORKDIR}/scripts/entrypoint.sh
exit 0