fix(frontend): delete mock public directory only for production

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-10-24 09:12:37 +02:00 committed by Erik Michelson
parent 7037c9f6ca
commit dd4e50103f

View file

@ -42,7 +42,12 @@ cp -R .next/static dist/frontend/.next/static
cp next.config.js dist/frontend/next.config.js
cp -R public dist/frontend/public
rm -f dist/frontend/.env
if [ "${NODE_ENV}" = "production" ]; then
echo "🦔 > Remove public directory because this is a production build"
rm -rf dist/frontend/public/public
fi
rm -rf dist/frontend/src
echo "🦔 > Done! You can run the build by going into the dist directory and executing \`node frontend/server.js\`"