release from SVN using “export” and then? how to upgrade?

后端 未结 2 379
[愿得一人]
[愿得一人] 2021-01-14 05:49

Using SVN, I was thinking about releasing the first build (ver 1.0) to production server using SVN export command.

What\'s the next step for upgrading? For example,

相关标签:
2条回答
  • 2021-01-14 06:49

    General release step:

    1. Create a Tag from the main/tested branch. This is released code. And can't be modified without branching. This is version 1.0. You build and deploy this code on production server.

    2. Continue coding for version 1.1 in the main branch (trunk). At the end of v1.1, you will create another tag which will be release version 1.1. And so on.

    Ideally, you keep one tag per release. If there are spot fixed that has to go to a previously released version, you (1)create a branch from that tag (say 1.0), (2)Fix the issue in the branch, (3) create another tag from this branch as release version 1.0.1

    Please note, that no files are deleted in the whole process. You are just creating new branches, which are cheap-copies of your code-base.


    Update

    But then how can i upgrade to tag 1.1 in production? Will SVN export overwrite existing files and delete files that are deleted in tag 1.1? This is my concern.

    Two things

    1. Export does not delete any files from anywhere. It downloads a clean copy (without .svn and other SVN specific stuffs) of the URL that you have provided to it as an argument. See here svn export

    2. When creating a branch or tag you should copy. And NOT export followed by import. The most common release flow looks like the diagram below: (sorry for the pathetic art)

    SVN Repository States with Time

                                                            /---> Tag 1.0.1(release to prod)
                        /--- Branch 1.0.1 for spot-fixes----|
                       /                                    |
                 /---Tag 1.0 (released to prod)             v (merge fixes)    /---Tag 1.1 (released to prod)
     Trunk ----->'------Development for v1.1----------------'----------------->'----Development for v1.2-->  
    

    You see nothing is ever deleted and you have tags for each releases.

    0 讨论(0)
  • 2021-01-14 06:53

    Sounds like you want to do some continuous integration.

    You can hook various build servers up to integrate with your SVN server, that way you can iteratively release your builds.

    More automated than doing it manually with an export.

    Have a look at

    http://www.thoughtworks-studios.com/go-agile-release-management/

    or

    http://www.jetbrains.com/teamcity/

    There's heaps of others out there also...

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