Advertisement
all2aller

Git Deploy

May 3rd, 2014
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. while read oldrev newrev ref
  4. do
  5.   branch=`echo $ref | cut -d/ -f3`
  6.  
  7.   if [ "master" == "$branch" ]; then
  8.    git --work-tree=/home/zetatest/public_html/esempio-master/ checkout -f $branch
  9.   fi
  10.  
  11.   if [ "dev" == "$branch" ]; then
  12.    git --work-tree=/home/zetatest/public_html/esempio-dev/ checkout -f $branch
  13.   fi
  14.  
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement