识别热修复/补丁的文件
我们(有时!)必须为我们的产品发布热修复程序,并通过直接重新发布受影响的文件而不是使用新的安装程序来实现此目的。 该产品有大量的代码,一些是托管代码,一些是非托管代码。
当前构建工件(exe、dll)的开发标志需要在热修复中提供。 我们希望能够通过将它们与之前的版本进行比较来自动识别它们。 简单的二进制差异不起作用,因为所有文件的版本号都已更改,因为如果是构建的一部分,则用新版本号标记文件。
是否有任何工具可以进行更智能的比较并决定应包含哪些文件? 我们仍然会让开发人员检查列表,这更多的是为了捕获开发人员没有想到的文件,而不是相反。
(注意:更改热修复/构建过程不是一个立即的选择,我们是否应该发送单个文件是一个不同的讨论!)
We (occasionally!) have to issue hot fixes for our product and do this by reissuing the affected files directly rather than with a new installer. The product has a large number of pieces, some managed code, some unmanaged.
Currently development flags which build artifacts (exes, dlls) need to be shipped in a hot fix. We'd like to be able to identify these automatically by comparing them to the previous build. A simple binary diff doesn't work since the version numbers on all the files have changed as stamping the files with a new number if part of the build.
Are there any tools that will do a more intelligent comparison and decide which files should be included? We'd still have a developer check the list, this is more to catch files the developer didn't think of than the other way around.
(Note: changing the hot fix/build process is not an immediate option, whether or not we should be shipping individual files is a different discussion!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些是我看到的选项:
在您的构建计算机上获取已更改文件的报告,并使用文件路径的目录结构来确定哪些 dll 确实已更新。 不确定这是否违反了您的“无构建过程更改”规则。
如果您想等到构建之后,我建议使用二进制文件比较工具,例如 http://www.romeotango.com/Downloads/FileCompReadMe.txt。 使用它,您可以取回一组差异,因此您只需要获取使用该工具的脚本即可忽略由于版本号而发生的差异。 您可以通过使用受控场景来找出版本号的显示模式,在该场景中您知道两个二进制文件除了版本号之外都是相同的,并记下差异所在。 对您的一些 dll 执行此操作,希望能够出现足够的模式,以便您可以编写脚本。
These are the options I see:
On your build machine get a report of the files that were changed and use the directory structure of the file path to determine which dlls were really updated. Not sure if this breaks your "no build process changes" rule or not.
If you want to wait until after the build I would recommend using a binary file diff tool like http://www.romeotango.com/Downloads/FileCompReadMe.txt. Using that you can get back a set of diffs so you just need to get your script that uses the tool to ignore the diff that occurs as a result of the version number. You can figure out the pattern to how the version number appears by using a controlled scenario where you know the two binary files are the same except for the version number and note where the differences are. Do that for a few of your dlls and hopefully a pattern emerges enough so that you can script it.