简体   繁体   English

使文件版本反映产品内部版本号和特定 dll/exe 版本的方法是什么?

[英]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 个简单快捷的选择:

  1. git tag
  2. 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.

相关问题 有没有办法让 git 自动为 --version 选项生成版本号文件? - Is there a way to make git auto generate a version number file for a --version option? 如何将TeamCity构建计数器写入DLL的FILE_VERSION_INFO - How to write TeamCity build counter into FILE_VERSION_INFO of dll 有没有一种方法可以将特定版本的文件添加到git索引中? - Is there a way to add a specific version of a file to the git index? Git有没有办法使将来的合并忽略分支之间pom文件中的版本号差异? - Is there a way with Git to make future merges ignore version number difference in a pom file between branches? 在构建时用新版本替换git子模块中的特定文件 - Replacing a specific file in git submodule with a new version at build time 如何构建特定版本的Chromium? - How to build a specific version of Chromium? 无法解析git.exe版本号 - Could not parse git.exe version number .o文件或构建版本控制的最佳实践是什么? - What's the best practice for .o file or build version control? 在不覆盖工作(签出)版本的情况下获取文件的 --ours 和 --theirs 版本的最简单方法是什么? - What is the easiest way to get --ours and --theirs version of a file without overwriting working (checked out) version? 在 git 中搜索特定版本的文件 - Search git for a specific version of a file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM