Created
January 28, 2020 09:21
-
-
Save svetlio/81a9f76ef54c748fd6ece586da02fb60 to your computer and use it in GitHub Desktop.
post-receive script in bare repo hooks to pre-populate code in web-server dir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [[ "d881" == "$branch" ]]; then | |
git --work-tree=/var/www/vhosts/fwi.stage/ checkout -f $branch | |
echo 'Changes pushed d881 branch to fwi.stage' | |
cp /var/sites-conf/fwi/.htaccess /var/www/vhosts/fwi.stage/web/.htaccess | |
cp /var/sites-conf/fwi/settings.php /var/www/vhosts/fwi.stage/web/sites/default/settings.php | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment