Teamcity 9: How to add git short hash into assembly info patcher

前端 未结 2 2084
后悔当初
后悔当初 2021-02-01 05:51

I\'m trying to use assembly info patcher to create a version number something like:

1.2.3.1a3c19e

where the last bit is the git short hash.

I\'ve tried u

2条回答
  •  天命终不由人
    2021-02-01 06:37

    If you mean .NET assembly you will not be able to use git's short hash as the revision number just because it accepts numbers only. You can check it yourself and put the version above to AssemblyVersion. I bet your app will not be compiled. Instead you can use %build.counter% variable from teamcity as the revision number.

提交回复
热议问题