diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh index 00335604..9aa2a863 100755 --- a/scripts/install-sdk.sh +++ b/scripts/install-sdk.sh @@ -51,25 +51,36 @@ resetColor=$'\e[0m' updateNodeModules() { echo "${magenta}--- Running npm install --------------------------------------------${resetColor}" "$NPM" install --production - + for i in $(git show HEAD:node_modules/); do if [ "$i" != tree ] && [ "$i" != "HEAD:node_modules/" ]; then [ -d node_modules/$i ] || git checkout HEAD -- node_modules/$i; fi done + + for pkg in kaefer smith; do + pushd packages/$pkg + npm link --production + popd + pushd node_modules + rm -rf $pkg + npm link $pkg + popd + done + rm -f package-lock.json - + echo "${magenta}--------------------------------------------------------------------${resetColor}" } updateCore() { - if [ "$NO_PULL" ]; then + if [ "$NO_PULL" ]; then return 0; fi - + # without this git merge fails on windows mv ./scripts/install-sdk.sh './scripts/.#install-sdk-tmp.sh' - rm -f ./scripts/.install-sdk-tmp.sh + rm -f ./scripts/.install-sdk-tmp.sh cp './scripts/.#install-sdk-tmp.sh' ./scripts/install-sdk.sh git checkout -- ./scripts/install-sdk.sh