Hello All,
Was implementing a server side custom post-receive hook.
clone_repo(){
export GIT_WORK_TREE="path/my_app"
//cloning a specifc branch on my_app dir
}
cd_app(){
cd my_app
}
pull(){
git pull origin develop
}
update_file(){
// updating random.java
}
commmit_file(){
git commit -m "commit from hook" random.java
}
while read oldrev newrev refname
do
if [ ${refname} = "refs/heads/master" ]
then
clone_repo
cd_app && update_file
commmit_file && push_it
exit 0
fi
done
*cd_app and update_file *is not working. Also tried via setting *GIT_DIR*
to *my_app.*
Could not find where gitlab logs for custom_hooks. And it seems I am
missing something. Can you guys give me further reference or identify what
I am doing wrong?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/gitlabhq/2d4d3283-a27a-4662-8bb4-14b702b21287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.