user233205
user233205

Reputation:

What's the best deployment strategy when using Subversion?

I have SVN setup on my local dev box, my live server has only outbound svn only. What's the best way to upload or commit the changes only to the live server. I have to upload the whole code base now. I don't like to follow the way anymore. Please suggest me a good way to have updates committed or uploaded to the live server.

Thank you.

Upvotes: 0

Views: 587

Answers (4)

Michael Hackner
Michael Hackner

Reputation: 8645

You could use a post-commit hook to trigger an svn export.

Upvotes: 0

Andreas
Andreas

Reputation: 5335

I don't get the "outbound" SVN only but SVN over HTTP using Apache is working fine for my configuration. Most tutorials out there will get you started in minutes.

The rest are "easy", if you are familiar with SVN.

Upvotes: 0

mmattax
mmattax

Reputation: 27670

If you're not going to use

svn export

make sure that your .svn directories are not web accessible. Otherwise one could potentially obtain your source code via the SVN files.


<IfModule mod_rewrite.c>
  RewriteRule ^(.*/)?\.svn/ - [F,L]
  ErrorDocument 403 "Access Forbidden"
</IfModule>

Upvotes: 0

John Feminella
John Feminella

Reputation: 311476

If you can't touch the Subversion server instance on your production server, you have a couple of options:

  • Publish the code elsewhere, then use the Subversion client on your production server to pull down a copy of the code from the published location. (Make sure you use svn export, not svn checkout, so that you don't get .svn directories scattered all over, or else protect your .svn directories in some way.)

  • Use a post-commit hook on your local development environment to push the code to the server (for example, via FTP). Every time you commit, you'll trigger a push to production. You'll probably want something more fine-grained -- for example, a common practice is to trigger this push whenever a tag is committed that includes the word "release".

Upvotes: 1

Related Questions