Pushing from subversion to web server

前端 未结 7 629
既然无缘
既然无缘 2021-01-31 10:23

Long ago I tried to sort out my system between local, web server and subversion. I got some good explanation on this question.

Unfortunately I hit a road block on the w

相关标签:
7条回答
  • 2021-01-31 11:27

    I had a somewhat similar question some time ago, however I didn't have SSH access into my server so I was quite limited in my options.

    Depending on the size of your project you might consider not doing an export. In my case the project was over a gig of data! Not practical because with an export you need to export all the files over and over again. If you only have a hand full of files it might be different. Also, doing an export on your local machine means that the export needs to download the file first and then upload it to your hosting which is like a waste of bandwidth.

    Also keep in mind that doing an SVN export doesn't do any database updates. E.g., while you're developing your site your database will probably change may times. With just an SVN export you still need to manually re-import the database on the server.

    What I suggest is that you write a script that you place on the server. You can make this script as elaborate as you want of course but the bare bone script would do an 'update' on a checked out version of your site, does an export of your database in a temp folder (your database is of course also placed under version control) and re-imports the database (or merges it, whatever it needs to do). With one single command you can then deploy your site. Over and over and over again.

    There are tools that can help you with this sort of automation, like CruiseControl and Capistrano.

    0 讨论(0)
提交回复
热议问题