I am trying to deploy a PHP application using subversion and post-commit script. I've been looking for how to write post-commit script but i can't get it to work.
Configuration : I have a svn folder installed on my server (OVH) in homeX.XX/svn/test/
My post-commit script should EXPORT to homeX.XX/dev/
I don't know how to write the proper path when using
#!/bin/bash
mkdir dev
chmod 777 dev
svn export svn+ssh://[email protected]/homeX.XX/XXX/svn/test dev
in my POST-COMMIT script. I've been looking for answers but did not find any...
From the SVN documentation (here):
I've been stung by this problem a few times. Basically the easiest way to write SVN commit hooks, although not very clean, is to hardcode all files and directories that you need as absolute paths.
So in this case, your script would look something like: