2022-07-01 23:40:22 -05:00
|
|
|
set -eo pipefail
|
|
|
|
|
2022-04-22 05:02:54 -05:00
|
|
|
echo Building packages
|
|
|
|
pnpm -- lerna run build --stream
|
|
|
|
|
|
|
|
echo Prune dependencies
|
|
|
|
rm -rf node_modules packages/*/node_modules
|
|
|
|
|
|
|
|
echo Install production dependencies
|
2022-07-26 03:12:34 -05:00
|
|
|
if [[ $INTEGRATION_TEST =~ ^(true|1)$ ]]; then
|
|
|
|
echo Install the mock connectors for integration tests only
|
|
|
|
cd packages/core
|
|
|
|
pnpm link @logto/connector-mock-sms
|
|
|
|
pnpm link @logto/connector-mock-email
|
2022-08-01 02:09:51 -05:00
|
|
|
pnpm link @logto/connector-mock-social
|
2022-07-26 03:12:34 -05:00
|
|
|
cd -
|
|
|
|
NODE_ENV=production pnpm i --no-frozen-lockfile
|
|
|
|
else
|
|
|
|
NODE_ENV=production pnpm i
|
|
|
|
fi
|
2022-04-22 05:02:54 -05:00
|
|
|
|
|
|
|
echo Prune files
|
|
|
|
rm -rf \
|
|
|
|
.git .github .husky .vscode .parcel-cache pnpm-*.yaml *.js \
|
|
|
|
packages/*/src \
|
|
|
|
packages/*/*.config.js packages/*/*.config.ts packages/*/tsconfig*.json
|
|
|
|
|
|
|
|
echo Tar
|
|
|
|
cd ..
|
|
|
|
tar -czf /tmp/logto.tar.gz logto
|