- This application is licenced under GNU General Public License, Version 3.0
SVN powered FTP client written in PHP.
I use SVN to track changes of my projects, mostly in PHP. Considering I have only FTP access to the server, I needed a way to upload only the modified/new files to the server, and not the whole project.
This script asks SVN about modified, added or removed files since the last push to the server, and then uploads them via FTP or removes the removed files. Also it updates the file containing the latest revision number pushed to the server (.revision file). Upon upload, the old version on server is renamed to 'file.old'.
There is an option (--zip
or -z
) to zip the files, upload them and then unzip them on the
server to save time and bandwidth (PHP required on the server). FTP credentials are saved to
an ini file.
Also there are options for uploading a single file (--file<=FILE>
or -f<FILE>
), updating
the .revision file on the server to a specific revision number (--update[=NUMBER]
or -u[NUMBER]
) and uploading
a specific revision (--revision<=NUMBER>
or -r<NUMBER>
).
- Make sure svn-ftp.php is executable (
chmod +x svn-ftp.php
). - Create a symbolic link from svn-ftp.php to '\usr\local\bin' (
ln -sf 'FULL/PATH/TO/svn-ftp.php' '/usr/local/bin/svn-ftp'
). - Copy config.ini.template to config.ini, review the configurations (
cp 'config.ini.template' 'config.ini'
).
You can do these three steps by running install.sh as root. svn-ftp should be called from inside root of a svn repository which is configured for svn-ftp (has .svn-ftp directory).
$ cd my_svn_project
$ svn-ftp init
$ svn commit -m 'my commit'
$ svn-ftp
- See [svn-ftp issues on GitHub] for open issues
- Windows and OS X: I have not tested this script on Windows and OS X. Thanks for helping me out fixing bugs on these platforms.
Don't hesitate to use GitHub to improve this tool. Don't forget to add yourself to the AUTHORS file.