mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-06 06:15:51 +00:00
Upgrade to 5.4 semi successful, working through deprecations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user