Guest User

Untitled

a guest
Apr 20th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/bin/sh
  2. # If the branch is not master, execute phpmetrics and upoload everything on the VPS
  3. current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
  4.  
  5. if [ $current_branch != "master" ]; then
  6. phpmetrics --report-html="/tmp/your-report" /var/www/VVV/www/your-project/htdocs/wp-content/plugins/your-plugin/ --config=phpmetrics.ini > /dev/null
  7. 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
  8. fi
Add Comment
Please, Sign In to add comment