Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # If the branch is not master, execute phpmetrics and upoload everything on the VPS
- current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
- if [ $current_branch != "master" ]; then
- phpmetrics --report-html="/tmp/your-report" /var/www/VVV/www/your-project/htdocs/wp-content/plugins/your-plugin/ --config=phpmetrics.ini > /dev/null
- sshpass -p your-password rsync --exclude={.sass-cache*,*.map,node_modules,.php_cs,.git*,*.lock,*.yml,*lock.json} --progress -avz /tmp/your-report -e ssh user@domain.tld:/var/www/your-metrics/$current_branch/ > /dev/null
- fi
Add Comment
Please, Sign In to add comment