2022-07-01 23:40:22 -05:00
|
|
|
set -eo pipefail
|
|
|
|
|
2022-12-14 12:24:32 -05:00
|
|
|
# Enable globstar (**) feature
|
|
|
|
shopt -s globstar
|
|
|
|
|
2022-04-22 05:02:54 -05:00
|
|
|
echo Prune dependencies
|
2022-12-14 00:23:59 -05:00
|
|
|
rm -rf node_modules packages/**/node_modules
|
2022-04-22 05:02:54 -05:00
|
|
|
|
|
|
|
echo Install production dependencies
|
2022-08-02 05:10:01 -05:00
|
|
|
NODE_ENV=production pnpm i
|
2022-04-22 05:02:54 -05:00
|
|
|
|
|
|
|
echo Prune files
|
2023-02-19 11:27:12 -05:00
|
|
|
# Remove cloud in OSS distributions
|
|
|
|
rm -rf packages/cloud
|
2022-12-14 12:24:32 -05:00
|
|
|
# Some node packages use `src` as their dist folder, so ignore them from the rm list in the end
|
|
|
|
find \
|
2023-01-01 08:46:03 -05:00
|
|
|
.git .changeset .changeset-staged .devcontainer .github .husky .parcel-cache .scripts .vscode pnpm-*.yaml *.js \
|
2022-12-14 00:23:59 -05:00
|
|
|
packages/**/src \
|
2022-12-14 12:24:32 -05:00
|
|
|
packages/**/*.config.js packages/**/*.config.ts packages/**/tsconfig*.json \
|
|
|
|
! -path '**/node_modules/**' \
|
|
|
|
-prune -exec rm -rf {} +
|
2022-04-22 05:02:54 -05:00
|
|
|
|
2022-12-29 21:42:34 -05:00
|
|
|
# Add official connectors
|
|
|
|
pnpm cli connector add --official -p .
|
|
|
|
|
2022-04-22 05:02:54 -05:00
|
|
|
echo Tar
|
|
|
|
cd ..
|
|
|
|
tar -czf /tmp/logto.tar.gz logto
|