Build numbers: major.minor.revision

后端 未结 7 2008
一向
一向 2020-12-22 17:47

How would you write a build.xml file, using neither custom code nor external dependencies (such as a shell script), that:

  • Generates a build number
7条回答
  •  鱼传尺愫
    2020-12-22 18:10

    This was a while ago, so this is from memory:

    I build a custom CruiseControl.Net labeller block that ticked up the build number on each build. It maintained an XML file with all 4 components of the version number and identified each project by name (so it could support multiple projects).

    The four values it generated get passed to the build process (nAnt, in our case), which had the responsibility of tweaking all the AssemblyInfo.cs files to reflect the proper build number.

    Edited to note: The only value that get automatically ticked up was the build number. Major/Minor version numbers were specified in the CC.Net project configuration. The build number restarted at 0001 for each change in major or minor revision number (e.g., if you went from version 7.1 to version 7.3, for instance, the 7.1 build might be at build number 783, but the first 7.3 build started with build number 1; the next 7.1 build would be build 784.

    Change version numbers merely required tweaking 1 setting the CC.Net config file.

提交回复
热议问题