Last active
August 12, 2021 12:38
-
-
Save mklooss/e867f0f68b00c624562ef0cd8a004c3e to your computer and use it in GitHub Desktop.
zwavejs2mqtt - manually update from source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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