irongit

The elusive post-receive example that I so often need

post-receive/post-receive
16 lines353 B
1#!/bin/bash
2
3# define the project details
4project=vflcountdown
5base=$HOME/$project
6
7while read oldrev newrev refname
8do
9 branch=`echo "$refname" | sed 's:.*/::'`
10 worktree=$base/$project-$branch
11 echo $worktree
12 mkdir -p $worktree
13 git --work-tree=$worktree --git-dir=$base checkout -f $branch
14 cd $worktree
15 bash entrypoint.sh
16done