File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " iofogcontroller" ,
3- "version" : " 1.0.16 " ,
3+ "version" : " 1.0.17 " ,
44 "description" : " ioFog Controller project for Eclipse IoFog @ iofog.org \\ nCopyright (c) 2018 Edgeworx, Inc." ,
55 "main" : " ./src/main.js" ,
66 "author" : " Saeid Baghbidi" ,
3737 "start" : " NODE_ENV=production node ./src/main.js start" ,
3838 "start-dev" : " NODE_ENV=development node ./src/main.js start" ,
3939 "build" : " export NODE_ENV=production && cd src/sequelize && ../../node_modules/.bin/sequelize db:migrate && ../../node_modules/.bin/sequelize db:seed:all" ,
40- "preinstall " : " bash scripts/preinstall .sh" ,
40+ "preuninstall " : " bash scripts/preuninstall .sh" ,
4141 "postinstall" : " bash scripts/postinstall.sh" ,
4242 "lint" : " ./node_modules/.bin/eslint \" **/*.js\" "
4343 },
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # store prev ver number
4+ export PREV_IOFOG_CONTROLLER_VER=$( npm list --depth=0 -g --silent | grep iofogcontroller | awk -F " @" ' {print $2}' )
5+ printf ' prev_ver: ' $PREV_IOFOG_CONTROLLER_VER > /tmp/iofogcontroller_install_variables
6+
7+ # backup db
8+ IOFOG_CONTROLLER_BIN_DIR=$( whereis iofog-controller | awk -F " " ' {print $2}' )
9+ IOFOG_CONTROLLER_BIN_DIR=${IOFOG_CONTROLLER_BIN_DIR% " iofog-controller" }
10+ IOFOG_CONTROLLER_SEQUELIZE_DIR=$IOFOG_CONTROLLER_BIN_DIR ' ../lib/node_modules/iofogcontroller/src/sequelize'
11+
12+ DEV_DB_FILE=$IOFOG_CONTROLLER_SEQUELIZE_DIR ' /dev_database.sqlite'
13+ if [ -f $DEV_DB_FILE ]; then
14+ mv $DEV_DB_FILE /tmp/
15+ fi
16+ PROD_DB_FILE=$IOFOG_CONTROLLER_SEQUELIZE_DIR ' /prod_database.sqlite'
17+ if [ -f $PROD_DB_FILE ]; then
18+ mv $PROD_DB_FILE /tmp/
19+ fi
You can’t perform that action at this time.
0 commit comments