Cleanup yarn cache before bundling the installers to reduce size

This commit is contained in:
Aditya Toshniwal 2024-08-30 14:09:53 +05:30
parent 61413c1902
commit f451f89d38
3 changed files with 7 additions and 1 deletions

View File

@ -233,6 +233,8 @@ REM Main build sequence Ends
RD /Q /S "%BUILDROOT%\web\regression" 1> nul 2>&1 RD /Q /S "%BUILDROOT%\web\regression" 1> nul 2>&1
ECHO Removing tools... ECHO Removing tools...
RD /Q /S "%BUILDROOT%\web\tools" 1> nul 2>&1 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... ECHO Removing any existing configurations...
DEL /q "%BUILDROOT%\web\pgadmin4.db" 1> nul 2>&1 DEL /q "%BUILDROOT%\web\pgadmin4.db" 1> nul 2>&1
DEL /q "%BUILDROOT%\web\config_local.py" 1> nul 2>&1 DEL /q "%BUILDROOT%\web\config_local.py" 1> nul 2>&1

View File

@ -180,6 +180,8 @@ _build_runtime() {
yarn plugin import workspace-tools yarn plugin import workspace-tools
yarn workspaces focus --production yarn workspaces focus --production
# remove the yarn cache
rm -rf .yarn .yarn*
popd > /dev/null || exit popd > /dev/null || exit
# Create the icon # Create the icon
@ -232,7 +234,7 @@ _copy_code() {
cp "${SOURCEDIR}/pkg/linux/config_distro.py" "${SERVERROOT}/usr/${APP_NAME}/web/" cp "${SOURCEDIR}/pkg/linux/config_distro.py" "${SERVERROOT}/usr/${APP_NAME}/web/"
cd "${SERVERROOT}/usr/${APP_NAME}/web/" || exit cd "${SERVERROOT}/usr/${APP_NAME}/web/" || exit
rm -f pgadmin4.db config_local.* 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 "tests" -type d -print0 | xargs -0 rm -rf
find . -name "feature_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 find . -name "__pycache__" -type d -print0 | xargs -0 rm -rf

View File

@ -62,6 +62,8 @@ _build_runtime() {
yarn plugin import workspace-tools yarn plugin import workspace-tools
yarn workspaces focus --production yarn workspaces focus --production
# remove the yarn cache
rm -rf .yarn .yarn*
popd > /dev/null || exit popd > /dev/null || exit
} }