Fix mistake in Game.js
[vchess.git] / hooks / post-update.dist
CommitLineData
f854c94f 1## V1:
ec58aacc 2#!/bin/sh
5a958354 3# NOTE: the ssh part is not required if git repo and vchess are on the same server
ec58aacc 4ssh user@server -t 'cd /path/to/vchess/client && git pull && npm run build'
f854c94f
BA
5
6## V2:
7#!/bin/sh
8cd /path/to/vchess || exit
9# See https://stackoverflow.com/questions/4043609/getting-fatal-not-a-git-repository-when-using-post-update-hook-to-execut
10unset GIT_DIR
11git pull
12clientLines=`git diff-tree --no-commit-id --name-only -r HEAD | grep client | wc -l`
13if [ $clientLines -ne 0 ]; then
14 cd client
15 npm run build
16fi
7c42b2ff
BA
17
18# NOTE: should also restart the service if server code changes