resources/deploy.sh in pave-0.12.0.rc3 vs resources/deploy.sh in pave-0.12.0
- old
+ new
@@ -1,8 +1,11 @@
#!bin/bash
if [ ! -d 'deploy.git' ]; then
mkdir deploy.git && cd deploy.git
git init --bare
echo '#!/bin/sh' > hooks/post-receive
- echo 'GIT_WORK_TREE=.. git checkout -f' >> hooks/post-receive
+ echo 'while read oldrev newrev ref' >> hooks/post-receive
+ echo 'do' >> hooks/post-receive
+ echo 'GIT_WORK_TREE=.. git checkout -f -B `basename "$ref"` "$newrev"' >> hooks/post-receive
+ echo 'done' >> hooks/post-receive
chmod +x hooks/post-receive
fi