Deploying with SVN

Asked

Viewed 141 times

2

I need to configure my environment to do PHP code versioning, but I’m having doubts about 'where to start'. The repository on the Linux/Apache server is created and I already installed Tortoise on my machine and then the doubts started.

1) Which directory to use locally?

For example, my current directory /localhost/app and I have the code there then:

a) I should create the SVN in the same folder (because that’s where I’ll change) and then do the checkout, or

b) I must have a 'a part' directory for SVN, and after all ok on localhost, copy to the SVN folder via a xcopy and then execute the checkout?

2) Sync and correction by

When the files are uploaded and the version is 'valid', I will be playing the files in /srv/svn on the server, but to really be worth the right was to play to /srv/httpd/app for example, how I should do to override the current version by this one that I just climbed?

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site

1 answer

1

Which directory to use locally ? For example, my current directory /localhost/app and I have the code there: a) I should create the SVN in the same folder (because that’s where I’ll change) and then check out, or b) I should have a 'part' directory for the SVN, and after everything ok on localhost, copy to the SVN folder via an xcopy and then run the checkout ?

A - I don’t see why to do the B under normal conditions, but if you have any plausible reason you can do it. Do not do anything without reason, as you see no reason, and many will not see, do the A.

2) Remote sync ? When the files are uploaded and the version is 'valid', I will be playing the files in /srv/svn on the server, but to really be worth the right was to play for /srv/httpd/app for example, as I must do to override the current version for this that just went up ?

I’m not sure I understand, especially what "worth" is. You will have a folder with the project on your machine and a folder with the project on the server, ready, you have nothing else. You have SVN running at 2, it has already been configured, you only have to use SVN command to synchronize between them. This is the SVN part.

If you’re talking about deploy, that is the deployment in production, usually has a mechanism that takes care of it when should do the deploy, in many cases not only copy to the place where it will run, have some script that takes care of it. But if it’s just copying, then leave a xcopy in the palm of your hand to make the deploy.

  • First of all, thank you for your answers. I already managed to create a local repository and to add a valid code folder and checkout, IE, in my local repository is ok, but for the remote I haven’t really been able to connect. ) ?

  • 1

    Yes, it is possible, it has Hooks which can be configured, but be careful not to deploy so automatic, unless you know a lot about what you’re doing and take care of all the details to deal with the flaws and that they all get caught before you do the deploy.

  • 1

    Thanks @Maniero I am already with the environment ready but due to time I could not prioritize tests (both the site to the server upload version and the promotion of the version that will be considered production).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.