Skip to content

Instantly share code, notes, and snippets.

@mklooss
Last active August 12, 2021 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mklooss/e867f0f68b00c624562ef0cd8a004c3e to your computer and use it in GitHub Desktop.
Save mklooss/e867f0f68b00c624562ef0cd8a004c3e to your computer and use it in GitHub Desktop.
zwavejs2mqtt - manually update from source
#!/bin/bash
systemctl stop zwavejs2mqtt
git fetch --all --prune
LATESTTAG=$(git describe --tags `git rev-list --tags --max-count=1`)
rm -rf node_modules package-lock.json yarn.lock .yarnclean yarn-error.log
rm -rf /dist/
rm -rf /server/
rm -rf /store/
rm -rf /pkg/
git checkout package-lock.json
git checkout package.json
git checkout yarn.lock
git checkout /dist/
git checkout /server/
git checkout /store/
git checkout /pkg/
git checkout ${LATESTTAG}
git gc
export npm_config_build_from_source=true
export NODE_OPTIONS=--max_old_space_size=8192
yarn install
#yarn add chalk
#yarn add
yarn run build
chown -R zwavejs2mqtt.zwavejs2mqtt ./
systemctl enable zwavejs2mqtt
systemctl restart zwavejs2mqtt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment