views:

31

answers:

2

I'm deveoping a big project, I have the dev folder (connected to a specific subdomain) then the "real" folder, the live one. When I'm ready to push patches or whole new versions I'm currently copying the files individually, is there a program that can help me do this task?

Keep in mind that some files (the config one and the htacess) and folders (the dev ones) do not need to be copied in the live version.

Thank you

+3  A: 

Yes: subversion (or any other version control system) will allow you to push changes painlessly.

A simplicistic solution would be to have one checkout where you develop and you commit to, and another checkout which is the deployment. When you are ready, you go to the deployment directory, and do a svn up, to sync it. It won't overwrite modified or excluded files.

Palantir
I actually thought of this, I was hoping for a one click solution :-P
0plus1
You can create a .bat file using the command line client of svn.
DanC
It is a one click approach - when you are ready you just launch a single command and have your deployment dir updated. It's true that you need to do all the committing work, but that's actually a HUGE benefit in a larger project: having a versioned repository often is priceless and it can really pay off, with only a small investment in time!
Palantir
+1  A: 

There are build packages like Capistrano and Phing which can help with more complicated deployments. Capistrano is Ruby-based, so it is a more natual choice for RoR applications, and Phing (being PHP-based) can be a little more convenient for PHP-based projects. In my experience, Phing seems less mature than Capistrano, but is a little more flexible because it doesn't assume you are working with a Ruby project like Capistrano seems to do. That's entirely opinion of course.

Both tend to take more thought and work to configure up front, but once you've designed the deploy script, you can run a single command and have everything happen for you while you watch. Both tools can integrate with source control like SVN, and bring copies of your project out of the repository for you. You can also break your deployment out into sub-parts, like a traditional Makefile, which helps with testing and reuse. If you want the process you go through for your releases to be bulletproof and consistent, you need to use a tool that will manage all the steps involved for you so you remove the human-error component.

beporter