summaryrefslogtreecommitdiff
path: root/git/hooks/studio-slots
diff options
context:
space:
mode:
Diffstat (limited to 'git/hooks/studio-slots')
-rwxr-xr-xgit/hooks/studio-slots/post-receive5
1 files changed, 4 insertions, 1 deletions
diff --git a/git/hooks/studio-slots/post-receive b/git/hooks/studio-slots/post-receive
index 71cc5fe..15bcf9b 100755
--- a/git/hooks/studio-slots/post-receive
+++ b/git/hooks/studio-slots/post-receive
@@ -1,4 +1,7 @@
#!/bin/bash
set -e
-GIT_WORK_TREE=/home/yyamashita/workspaces/repos/studio-slots git checkout -f
+WORK_TREE=/home/yyamashita/workspaces/repos/studio-slots
+GIT_WORK_TREE=$WORK_TREE git checkout -f
+# フックは root で動くので、作業ディレクトリの所有者を戻す
+chown -R yyamashita:yyamashita "$WORK_TREE"
echo "Deploy complete: studio-slots"