Assembly Versioning and Dll Versioning in Team City

后端 未结 4 1434
后悔当初
后悔当初 2021-02-04 05:12

I want to have these Versions in a format

like this.. {Major}.{Minor}.{Build}.{patch}

how to set this in the assembly info patcher in team city?

so that

相关标签:
4条回答
  • 2021-02-04 05:35

    Using the File Content Replacer build feature suggested by Paul, we eventually ended up with the following versioning scheme in our project:

    http://www.meadow.se/wordpress/generating-semantic-version-build-numbers-in-teamcity/

    A little bit complicated to setup but we're happy with the results.

    /Emil

    0 讨论(0)
  • 2021-02-04 05:37

    Regarding the question from Emil G about keeping the first numbers of the version from AssemblyInfo, it's currently not possible: https://youtrack.jetbrains.com/issue/TW-20475

    Would be nice, though.

    /Emil Å

    0 讨论(0)
  • 2021-02-04 05:38

    It's now possible to be done through the File Content Replacer (available since TeamCity 9.1): https://confluence.jetbrains.com/display/TCD9/File+Content+Replacer

    0 讨论(0)
  • 2021-02-04 05:52

    TeamCity can version assemblies for you with the AssemblyInfo Patcher build feature. To take advantage of this:

    1. Create a build parameter called %Major.Minor%. Set this manually to some value, e.g. 1.0.
    2. On the General Settings tab, set the Build number format to %Major.Minor%.%build.vcs.number%.%build.counter%.
    3. On the Build Steps tabe, scroll to the Additional Build Features at the bottom of the page. Add an Assembly Info Patcher build step. It will default to using the %system.build.number%, which you've defined in step 2.

    This will result in all of your assemblies being versioned with the %system.build.number%, which includes the Major and Minor version, the VCS revision, and TeamCity's incremental build number.

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