Thursday, November 02, 2006

Script to Setup Rails in Subversion

The following notes is based on the thread Create a rails project skeleton and import and checkout from svn all at once!

1. Create your repository on the server

2. Put the source code in a file called ‘svnrails’ inside of a directory that’s in $PATH. I have mine in /usr/local/bin (where the svn, rails and ruby binaries like to do their thing)

3. This will work with any kind of svn repository (ie. file:///, svn://, http://)

4. If your repository requires authorization, you will be prompted when necessary.

5. I haven’t built any error handling into this, so use the ol’ “measure twice and cut once” technique when typing this command

6. Type the command without arguments for usage

7. You have the option of not creating the /trunk, etc. directories in the repository; and the default command looks like this:

svnrails myapp svn://myserver

8. As long as you’ve created a repository called myapp on the subversion server, this script will automatically import your project into it. In other words, it defaults the name of the repository to be the same as the name of the app; this can be overriden (sensible defaults and all that).

9. Ignores various files in the repository as per the rails wiki

You can find the code here


Doubt: Does this require any changes for Edge Rails?

No comments:

Post a Comment