SHARE
TWEET

Untitled

a guest Jun 25th, 2019 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while read oldrev newrev ref
  2. do
  3.     if [[ $ref =~ .*/master$ ]];
  4.     then
  5.         echo "Deploying to Live Server..."
  6.             git --work-tree=/var/www/vhosts/domain.com/live --git-dir=/var/www/vhosts/domain.com/domain.git checkout master -f
  7.     elif [[ $ref =~ .*/develop$ ]];
  8.     then
  9.         echo "Deploying to Development Server..."
  10.             git --work-tree=/var/www/vhosts/domain.com/dev --git-dir=/var/www/vhosts/domain.com/domain.git checkout develop -f
  11.     else
  12.         echo "Only the master or dev branches may be deployed."
  13.     fi
  14. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top