irongit

The elusive post-receive example that I so often need

you can't run forever

FIRST_NAME LAST_NAMEauthored
commit 5a8663d7014df888ca39baeb6f729cccd4f911abBrowse files

1 file changed, +15 -0

+15-0post-receive
@@ -0,0 +1,15 @@
1+#!/bin/bash
2+
3+# define the project details
4+project=vflcountdown
5+base='/web/$project'
6+
7+while read oldrev newrev refname
8+do
9+ branch=`echo "$refname" | sed 's:.*/::'`
10+ worktree='$base/$project-$branch'
11+ git --work-tree=$worktree --git-dir=$base.git checkout -f $branch
12+ cd $worktree
13+ # project commands
14+ npm run build
15+done