Skip to content

Commit

Permalink
Cleanup yarn cache before bundling the installers to reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatoshniwal committed Aug 30, 2024
1 parent 61413c1 commit f451f89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ REM Main build sequence Ends
RD /Q /S "%BUILDROOT%\web\regression" 1> nul 2>&1
ECHO Removing tools...
RD /Q /S "%BUILDROOT%\web\tools" 1> nul 2>&1
ECHO Removing yarn cache...
RD /Q /S "%BUILDROOT%\web\.yarn" 1> nul 2>&1
ECHO Removing any existing configurations...
DEL /q "%BUILDROOT%\web\pgadmin4.db" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\config_local.py" 1> nul 2>&1
Expand Down
4 changes: 3 additions & 1 deletion pkg/linux/build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ _build_runtime() {
yarn plugin import workspace-tools
yarn workspaces focus --production

# remove the yarn cache
rm -rf .yarn .yarn*
popd > /dev/null || exit

# Create the icon
Expand Down Expand Up @@ -232,7 +234,7 @@ _copy_code() {
cp "${SOURCEDIR}/pkg/linux/config_distro.py" "${SERVERROOT}/usr/${APP_NAME}/web/"
cd "${SERVERROOT}/usr/${APP_NAME}/web/" || exit
rm -f pgadmin4.db config_local.*
rm -rf jest.config.js babel.* package.json node_modules/ regression/ tools/ pgadmin/static/js/generated/.cache
rm -rf jest.config.js babel.* package.json .yarn* yarn* .editorconfig .eslint* node_modules/ regression/ tools/ pgadmin/static/js/generated/.cache
find . -name "tests" -type d -print0 | xargs -0 rm -rf
find . -name "feature_tests" -type d -print0 | xargs -0 rm -rf
find . -name "__pycache__" -type d -print0 | xargs -0 rm -rf
Expand Down
2 changes: 2 additions & 0 deletions pkg/mac/build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ _build_runtime() {
yarn plugin import workspace-tools
yarn workspaces focus --production

# remove the yarn cache
rm -rf .yarn .yarn*
popd > /dev/null || exit
}

Expand Down

0 comments on commit f451f89

Please sign in to comment.