Sunday, February 13, 2011

How to use SVN to rollout ASP.NET websites?

We use ASP.NET / C#.

We work locally, test locally, check in our code and binaries through SVN.

On our server, we checkout the latest 'build' from SVN directly into our IIS web directory.

Is this a good practice, or is there something else we should be doing for rollouts?

  • I theory there is no problem with this practise. I imagine it keeps your rollouts simple and you are able to check which revision is currently live at any given time.

    Perhaps others will raise pertinent issues but I really can't see any major reasons not to do this.

  • I do the same thing with 1 exception...I first checkout the latest build to a dev version of the site on the same server just to make sure there aren't any weird issues on the server-side. It's rare that ever are any, but it's happened before.

    Not sure if there's a better way of doing it, but it's worked well for me so far.

    From upheaval
  • Why check it out? You could easily create a script to export it (clean, no .svn directories, no mess) to the IIS directory.

    SVN supports an export feature, SVN Export

    Edit: Just noticed this has been covered before on SO: Link

    rmeador : The reason to check it out is so you can do updates instead of full redeployments. Also, you can roll it back when you mess up (which you inevitably will).
    thismat : Both of which you can do with export. Export supports revision exports, plus, you typically do not want your source in your root web, shouldn't all sites be precompiled when finished and deployed?
    thismat : I just don't see the reason to have excess clutter and hassle. A simple export keeps things clean. Only want to export one or two files? Export those two files....It's very easy to script and easier to manage than having a full blown versioned copy.
    From thismat

0 comments:

Post a Comment