好吧,我明白,這可能不是傳統的,但那一邊:我使用AssemblyFileVersion作爲我的「生成名稱」字符串的一種。這是格式化這樣的:使用GIT自動化AssemblyFileVersion增量
' File Version information for an assembly consists of the following four values:
'
' Year
' Month
' Day
' Commit Number for that day
'
' Build Name can either be alpha | beta | hotfix | release
' alpha - is a development buildname with rapid changing API
' beta - is a production build for our beta users
' hotfix - is a production version with a bug fix
' release - is a standard issue production version.
<Assembly: AssemblyVersion("0.8.3")>
<Assembly: AssemblyFileVersion("13.10.24.3")>
<Assembly: AssemblyBuildName("alpha")>
Unfourtunately我不必調整AssemblyInfo.vb中EVERY TIME我做了git的承諾。現在我知道GIT實際上將提交存儲在.git目錄中幾個地方的日誌文件中。我的問題是:是否有自動此文件從git文件中讀取以查看年/月/日/提交#ForThatDay並自動調整AssemblyFileVersion(甚至自定義Assembly Attribute)?
你可能想要預先提交某種鉤子。不重複,但相關:http://stackoverflow.com/q/12890755/945456 –