简体   繁体   English

使用“导出”从SVN发布然后?怎么升级?

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

Using SVN, I was thinking about releasing the first build (ver 1.0) to production server using SVN export command. 使用SVN,我正在考虑使用SVN export命令将第一个版本(版本1.0)发布到生产服务器。

What's the next step for upgrading? 升级的下一步是什么? For example, if i want to release the next build which will be 1.1, how should this be done? 例如,如果我想发布下一个1.1的版本,应该怎么做呢? Without deleting all files, is there a way to just upgrade from the tag? 如果不删除所有文件,有没有办法从标签升级?

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. 这是1.0版。 You build and deploy this code on production server. 您在生产服务器上构建和部署此代码。

  2. Continue coding for version 1.1 in the main branch (trunk). 继续在主分支(主干)中编译版本1.1。 At the end of v1.1, you will create another tag which will be release version 1.1. 在v1.1结束时,您将创建另一个将发布版本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 如果有固定点必须转到以前发布的版本,你(1)从该标签创建一个分支 (比如说1.0),(2)修复分支中的问题,(3)从这个分支创建另一个标签发行版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? 但是,如何在生产中升级到标签1.1? Will SVN export overwrite existing files and delete files that are deleted in tag 1.1? SVN导出是否会覆盖现有文件并删除标签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. 它下载了您作为参数提供给它的URL的干净副本(没有.svn和其他特定于SVN的东西)。 See here svn export 在这里看到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 具有时间的SVN存储库状态

                                                        /---> 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. 您看不到任何内容被删除,并且每个版本都有标签。

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. 您可以挂起各种构建服务器以与SVN服务器集成,这样您就可以迭代地发布构建。

More automated than doing it manually with an export. 比使用导出手动执行更自动化。

Have a look at 看一下

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

or 要么

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

There's heaps of others out there also... 那里还有很多其他人......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM