Skip to content

Commit

Permalink
add migration step for redmatic-homekit
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Feb 17, 2019
1 parent e91c733 commit e52041f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions addon_files/update_script
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ fi
#
# Delete lib/node_modules on update
#
if [ -d $RED_DIR/lib/node_modules/node-red ]; then
rm -r $RED_DIR/lib/node_modules/node-red
fi
if [ -d $RED_DIR/lib/node_modules/npm ]; then
rm -r $RED_DIR/lib/node_modules/npm
fi
if [ -d $RED_DIR/lib/node_modules/ain ]; then
rm -r $RED_DIR/lib/node_modules/ain
if [ -d $RED_DIR/lib/node_modules ]; then
rm -r $RED_DIR/lib/node_modules
fi

#
Expand Down Expand Up @@ -98,6 +92,17 @@ if [ -d $RED_DIR/var/node_modules/node-red-node-serialport ]; then
rm $RED_DIR/var/package.json.bak
fi

#
# Migration <= 2.6.0 to > 2.6.0
# Remove Packages that where moved to lib dir
#
if [ -d $RED_DIR/var/node_modules/redmatic-homekit ]; then
rm -r $RED_DIR/var/node_modules/redmatic-homekit
cp $RED_DIR/var/package.json $RED_DIR/var/package.json.bak
cat $RED_DIR/var/package.json.bak | $RED_DIR/bin/jq 'del(.dependencies."redmatic-homekit")' > $RED_DIR/var/package.json
rm $RED_DIR/var/package.json.bak
fi

#
# Remove package-lock
#
Expand Down

0 comments on commit e52041f

Please sign in to comment.