Auto-update apps with Subversion and Folder Actions

Jan 26, '05 08:44:00AM

Contributed by: mankoff

I'm a developer. I keep my code in a Subversion repository. I like to keep my boss up-to-date with the latest build(s) of my project. In order to make this as transparent as possible for him, I combined Subversion, AppleScript, and Folder Action Scripts. He keeps two folders on his Desktop for this project: nightly (the latest nightly builds) and stable (the latest stable build).

I attach this AppleScript to the stable folder:

on opening folder this_folder
  do shell script "cd ~/Desktop/stable; /usr/local/bin/svn up"
end opening folder
Now, each time he opens the stable folder (that contains my application), Subversion gets the latest copy of the application. Repeat the above with obvious changes to get nightly to sync also. In order for the above to work, you need to perform two extra steps (one time only, when you set everything up):
  1. Install Subversion, either from Fink or Martin Ott's homepage (TheCodingMonkeys co-founder).
  2. Do the initial checkout:
    svn co svn://somehost/someproject/stable/ ~/Desktop/stable
    
[robg adds: I haven't tested this one...]

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2005012313105350