3 # NOTE: the ssh part is not required if git repo and vchess are on the same server
4 ssh user@server -t 'cd /path/to/vchess/client && git pull && npm run build'
8 cd /path/to/vchess || exit
9 # See https://stackoverflow.com/questions/4043609/getting-fatal-not-a-git-repository-when-using-post-update-hook-to-execut
12 clientLines=`git diff-tree --no-commit-id --name-only -r HEAD | grep client | wc -l`
13 if [ $clientLines -ne 0 ]; then
17 # TOOD: also should restart the service if server code changes