|
1 | 1 | svn2ftp
|
2 | 2 | =======
|
3 |
| -## Purpose |
4 |
| -### Short Story |
5 |
| -This Python script automatically uploads SVN commits to a specified FTP location. |
6 |
| - |
7 |
| -### Long Story |
| 3 | +## Features |
8 | 4 | When converting my website to SVN, I wanted a tool to allow me to avoid manually
|
9 |
| -uploading changes to my FTP server. I found some solutions online, but most of |
| 5 | +uploading commit changes to my FTP server. I found some solutions online, but most of |
10 | 6 | them weren't exactly what I was looking for, and many were too complicated.
|
11 |
| - |
12 | 7 | I ended up making something from scratch using the changelist provided by SVN.
|
13 |
| -I had to figure out how to pass it the sensitive user information. I decided |
14 |
| -to use a local file which the script would use to extract what it needed. |
15 |
| -While it's not the most secure solution, it was good enough for my needs. |
16 |
| -Feel free to fork this project and implement your own way of passing the ftp information. |
17 |
| -An example solution could be to prompt the user each time a commit is pushed. |
| 8 | + |
| 9 | +This tool automatically uploads all new and modified files to the server, and deletes |
| 10 | +any file or folder that was removed from the SVN repo. The script runs when a commit completes. |
18 | 11 |
|
19 | 12 | ## Installation
|
20 | 13 | This script is very simple to install.
|
21 | 14 |
|
22 | 15 | 1. Copy post-commit.bat and FTP.py to your svn\hooks\ folder.
|
23 |
| -2. Create a file that will contain the necessary FTP server information (each item should be on its own line, in the following order): |
24 |
| - - The full path location to the local SVN repo |
25 |
| - - The full URL to the FTP server |
26 |
| - - The username for the FTP server |
27 |
| - - The password for the FTP server |
28 |
| - - The root directory to upload the repo to (default should be './') |
29 |
| -3. Modify FTP.py's SETTINGS_FILE variable to the full location of this file |
30 |
| -4. Make a commit and see the script run. |
31 |
| - |
32 |
| -### Example settings file |
33 |
| -<pre> |
34 |
| -E:\mysite |
35 |
| -robbie.ftpserver.org |
36 |
| -robbie |
37 |
| -thepassword |
38 |
| -public_html/ |
39 |
| -</pre> |
| 16 | +2. Modify the following varaibles in FTP.py |
| 17 | + - LOCAL - The full path location to the local SVN repo |
| 18 | + - FTP_SERVER - The full URL to the FTP server |
| 19 | + - REMOTE_ROOT - The root directory to upload the repo to |
| 20 | +3. Make a commit, enter your username and password, and see the script run. |
40 | 21 |
|
41 | 22 | ## TODO
|
42 | 23 | - Modify post-commit.bat so the command prompt closes automatically
|
|
0 commit comments