Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying a Website from Subversion

Tags:

svn

I am new to subversion and am wondering how do you move from develoment to staging then production?

I think I grasp the concept of creating branches made for releases as detailed here. But how do I actually deploy the branch?

Ideally I could just set up a new website and copy the files over from the branch, but I am concerned about copying any svn bindings into production.

If it is pertinent, this is a Visual Studio website project and I am using VisualSVN server, TortoiseSVN and Ankh to integrate with Visual Studio.

like image 415
personaelit Avatar asked Nov 30 '09 21:11

personaelit


4 Answers

svn export

Exports the files excluding all the subversion cruft

like image 63
John Weldon Avatar answered Oct 21 '22 17:10

John Weldon


You're missing a piece here, basically - you shouldn't use subversion alone to deploy to test and production. Your best bet is to use some sort of script which will pull the build from subversion (if use svn export, it won't bring along subversion file hooks), build any necessary files (using MSBuild, which can be scripted), remove the unecessary files (such as .aspx.cs files since you've built the thing), and copy it over to your environment.

Locally, we use powershell to glue everything together and a combination of the svn command line, MSBuild, and nUnit from the command line to do our builds.

like image 5
John Christensen Avatar answered Oct 21 '22 16:10

John Christensen


You want to do a svn export. this will export the code without the .svn directories all over the place.

like image 4
Byron Whitlock Avatar answered Oct 21 '22 15:10

Byron Whitlock


It sounds like you will want to do a SVN Export of the "release" branch. See the Subversion Book's Export documentation for details.

like image 4
Richard J Foster Avatar answered Oct 21 '22 17:10

Richard J Foster