суббота, 29 декабря 2007 г.

Subversion (SVN) updates over FTP and SSH

Sometimes it is reasonable to make svn updates to another server. While your project repository is stored at your test host, production server may not support svn feature at all...

Here is how to do it in svn post-commit hook:
A. FTP
rm -R /path/to/your/distr ## remove old files
checkout -r $REV svn://yoursvnhost.com /path/to/your/distr
cd /path/to/your/distr
gfind -name .svn -print0 xargs -0 rm -rf ##remove svn stuff
ncftpput -m -R -u username -p password hostname /target_path /path/to/your/distr

B. SSH
scp -r /path/to/your/distr/* username@host:/target_path
isn ssh way you will need to generate ssh public key file to your target host.

1 комментарий:

Анонимный комментирует...

Thank you, I was looking for this for a long time