简体   繁体   English

软件版本控制

[英]Software Versioning

Platform : Visual Studio 2008 (I know it's old but I have my own reasons).平台:Visual Studio 2008(我知道它很旧,但我有自己的原因)。

I am new to the concept of software versioning so I need advice as how to use it.我是软件版本控制概念的新手,因此我需要有关如何使用它的建议。

Currently, here is how I use software versioning:-目前,这是我使用软件版本控制的方式:-

  • 1.0.0.0 to 1.0.0.1 (For bugs removal) 1.0.0.01.0.0.1 (用于消除错误)
  • 1.0.0.0 to 1.0.1.0 (For minor changes in software like performance improvement) 1.0.0.01.0.1.0 (对于软件的微小变化,如性能改进)
  • 1.0.0.0 to 1.1.0.0 (For addition of certain functionality in software) 1.0.0.01.1.0.0 (用于在软件中添加某些功能)
  • 1.0.0.0 to 2.0.0.0 (For major updates) 1.0.0.02.0.0.0 (主要更新)

I learned this from here .我从这里学到了这一点

Now the problem I can think of is that when the software reaches version 3.5.17.3485 from version 1.0.0.0 then there would be bajillion lines of code.现在我能想到的问题是,当软件从1.0.0.0版本升级3.5.17.3485版本时,就会有无数行代码。 For example:例如:

Update 1.0.0.0 to 1.0.0.1将 1.0.0.0 更新为 1.0.0.1

  1. Used stored procedure instead of a view使用存储过程而不是视图
  2. Backup feature added添加了备份功能

Update 1.0.0.1 to 1.0.0.2将 1.0.0.1 更新为 1.0.0.2

  1. Improved backup feature utility.改进的备份功能实用程序。

Update 1.0.0.2 to 1.0.0.3将 1.0.0.2 更新为 1.0.0.3

  1. Bug fixed in software backup feature.修复了软件备份功能中的错误。

Now lets assume that updating from version 1.0.0.0 to 1.0.0.1 took 40 lines of code to change the design of database or files stored in the system and for every separate update it will take more and more code depending upon the update.现在让我们假设从1.0.0.0版本更新到1.0.0.1需要40 行代码来更改存储在系统中的数据库或文件的设计,并且对于每个单独的更新,根据更新需要越来越多的代码。 Now after reaching 3.5.17.3485 version think of how many lines of code will be there.现在到了3.5.17.3485版本后想想会有多少行代码。

Can anyone tell me how to handle such a situation?谁能告诉我如何处理这种情况?

You should look into Semantic Versioning :您应该查看语义版本控制

Consider a version format of XYZ (Major.Minor.Patch).考虑 XYZ (Major.Minor.Patch) 的版本格式。 Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.不影响 API 的错误修复会增加补丁版本,向后兼容的 API 添加/更改会增加次要版本,向后不兼容的 API 更改会增加主要版本。

Only releases that change the major version actually might require the user of your application to change his/her own code.只有实际更改主要版本的版本才可能需要您的应用程序用户更改他/她自己的代码。

Why would the developer need to maintain update logs?为什么开发人员需要维护更新日志? If you use svn/git or anything else the task can easily be automated.如果你使用 svn/git 或其他任何东西,这个任务可以很容易地自动化。 Also, I think everyone would be quite happy if the readme/history files for version 3.5.17.xxx were only containing logs since version 3.5.0.0.另外,如果版本 3.5.17.xxx 的自述文件/历史文件仅包含自版本 3.5.0.0 以来的日志,我认为每个人都会很高兴。

Automating as much as possible of the build system has many advantages, not the least being that an automated task cannot forget things when doing a 'quick' fix, or a special release for a client.尽可能多地自动化构建系统有许多优点,尤其是自动化任务在进行“快速”修复或为客户发布特殊版本时不会忘记事情。

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

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