Upgrade to 5.4 semi successful, working through deprecations

This commit is contained in:
Ronald A. Richardson
2023-12-08 13:52:38 +08:00
parent c5574a25ae
commit 48069177df
11 changed files with 30 additions and 14 deletions

View File

@@ -10,11 +10,21 @@ if [ ! -d "$packages_dir" ]; then
exit 1
fi
# Check for the command-line argument to remove pnpm-lock.yaml
# Initialize flags
remove_lock=false
if [ "$1" == "--remove-lock" ]; then
remove_lock=true
fi
remove_modules=false
for arg in "$@"
do
case $arg in
--remove-lock)
remove_lock=true
;;
--remove-modules)
remove_modules=true
;;
esac
done
# Navigate to the packages directory
cd "$packages_dir"
@@ -30,6 +40,12 @@ for dir in */; do
rm "${dir}pnpm-lock.yaml"
fi
# Remove ./node_modules if the option is set
if [ "$remove_modules" = true ] && [ -d "${dir}node_modules" ]; then
echo "Removing /node_modules in $dir"
rm -rf "${dir}node_modules"
fi
cd "$dir"
pnpm install
cd "$packages_dir" # Go back to the packages directory