a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- while read oldrev newrev ref
- if [[ $ref =~ .*/master$ ]];
- echo "Deploying to Live Server..."
- git --work-tree=/var/www/vhosts/domain.com/httpdocs --git-dir=/var/www/vhosts/domain.com/domain.git checkout master -f
- elif [[ $ref =~ .*/develop$ ]];
- echo "Deploying to Development Server..."
- git --work-tree=/var/www/vhosts/domain.com/dev.domain.com --git-dir=/var/www/vhosts/domain.com/domain.git checkout develop -f
- echo "Only the master or dev branches may be deployed."
RAW Paste Data