[英]What is the way to make file version reflect both product build number and version of the specific dll/exe?
What is the way to make file version reflect both product build number and version of the specific dll (version considered changed when version control system revision number is changed for the source project for the file) on the build server.有什么方法可以使文件版本同时反映产品构建号和特定 dll 的版本(当文件的源项目的版本控制系统修订号更改时,版本被认为已更改)在构建服务器上。 How to to achieve this with minimal efforts?
如何以最小的努力实现这一目标?
My build env.我的构建环境。 : Git, TeamCity, Visual Studio, Nant.
:Git、TeamCity、Visual Studio、Nant。
What is the way to make file version reflect both product build number and version of the specific dll
使文件版本反映产品内部版本号和特定 dll 版本的方法是什么
You have 2 simple and fast options:您有 2 个简单快捷的选择:
git tag
git notes
git tag
Create an annotated tag.创建带注释的标签。
Annotated tags are created using the -a
flag.带注释的标签是使用
-a
标志创建的。
The difference between regular tag to annotated tag is that the annotated tag is like a commit, it contain the date, author and the message attached to it.常规标签与带注释的标签之间的区别在于带注释的标签就像一个提交,它包含日期、作者和附加到它的消息。
Once you create the tags simply push it to the github repository git push --tags
.创建标签后,只需将其
git push --tags
github 存储库git push --tags
。
# Creating annotated tag
git tag -a
git notes
Add a notes to the commit.向提交添加注释。 The notes are not part of the commit message and can be modified if needed later on with no effect on the commit SHA-1
注释不是提交消息的一部分,可以在以后需要时进行修改,而不会影响提交 SHA-1
# Add a note to any desired commit
git notes add -m 'Dll version #xxx, Build#yyy' 72a144e2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.