I need to set up post-receive hook script on Gitblit server that will pull changes to a website on the same server. In a bash script, command would look something like this:
sudo git --work-tree=/var/www/html/mysite --git-dir=/var/www/html/mysite/.git pull
But as I understand, Gitblit uses groovy hooks scripts, and I'm completely new to this. Can someone please help me with creating a groovy script for this, or at least direct me to some good examples or tutorial for Groovy.
Thanks