久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何通過我們的 CI 平臺 (Hudson) 自動增加 C# 程序

How can I auto increment the C# assembly version via our CI platform (Hudson)?(如何通過我們的 CI 平臺 (Hudson) 自動增加 C# 程序集版本?)
本文介紹了如何通過我們的 CI 平臺 (Hudson) 自動增加 C# 程序集版本?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我和我的團隊在增加程序集版本號方面非常糟糕,而且我們經常發布 1.0.0.0 版本的程序集.顯然,這會引起很多麻煩.

Myself and my group are horrendous at incrementing assembly version numbers and we frequently ship assemblies with 1.0.0.0 versions. Obviously, this causes a lot of headaches.

通過我們的 CI 平臺,我們的實踐變得更好了,我會真的很喜歡將其設置為自動增加 assemblyinfo.cs 文件中的值,以便我們的程序集版本隨著該程序集中的代碼更改自動更新.

We're getting a lot better with our practices via our CI platform and I'd really like to set it up to auto increment the values within the assemblyinfo.cs file so that the versions of our assemblies are auto updated with the code changes in that assembly.

我之前設置了(在我們發現 Hudson 之前)一種遞增方式通過 msbuild 或命令行(不記得)的值,但使用 Hudson,這將更新 SVN 存儲庫并觸發另一個構建.由于 Hudson 每小時輪詢 SVN,這將導致緩慢的無限循環.

I had previously setup (before we found Hudson) a way to increment the value through either msbuild or the command line (can't remember), but with Hudson, that will update the SVN repository and trigger ANOTHER build. That would result in a slow infinite loop as Hudson polls SVN every hour.

讓 Hudson 增加版本號是個壞主意嗎?有什么替代方法可以做到這一點?

Is having Hudson increment the version number a bad idea? What would be an alternative way to do it?

理想情況下,我的解決方案標準應該是:

Ideally, my criteria for a solution would be one that:

  • 在構建之前增加 assemblyinfo.cs 中的構建號
  • 僅增加已更改程序集中的內部版本號.這可能是不可能的,因為 Hudson 每次構建時都會清除項目文件夾
  • 將更改后的 assemblyinfo.cs 提交到代碼庫(當前為 VisualSVN)
  • 不會導致 Hudson 在下次掃描更改時觸發新構建

在我的腦海中解決這個問題后,我可以通過批處理文件/命令輕松地想出解決大部分問題的方法,但我的所有想法都會導致 Hudson 在下次掃描時觸發新構建.我不是在找人為我做所有事情,只是為我指明正確的方向,也許是一種讓 Hudson 忽略某些 SVN 提交的技術,等等.

Working this out in my head, I could easily come up with a solution to most of this through batch files / commands, but all of my ideas would cause Hudson to trigger a new build the next time it scans. I'm not looking for someone to do everything for me, just point me in the right direction, maybe a technique to get Hudson to ignore certain SVN commits, etc.

到目前為止,我發現的所有內容都只是一篇解釋如何讓版本號自動遞增的文章,沒有考慮到可能陷入無限循環的 CI 平臺.

Everything I've found so far is just an article explaining how to get the version number automatically incremented, nothing takes into account a CI platform that could be spun into an infinite loop.

推薦答案

一個簡單的替代方法是讓 C# 環境通過將 version 屬性設置為 major.minor.* 為您增加程序集版本(如 AssemblyInfo 文件模板中所述.)

A simple alternative is to let the C# environment increment the assembly version for you by setting the version attribute to major.minor.* (as described in the AssemblyInfo file template.)

不過,您可能正在尋找更全面的解決方案.

You may be looking for a more comprehensive solution, though.

編輯(在評論中回復問題):

EDIT (Response to the question in a comment):

來自 AssemblyInfo.cs:

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

這篇關于如何通過我們的 CI 平臺 (Hudson) 自動增加 C# 程序集版本?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a way to know if someone has bookmarked your website?(有沒有辦法知道是否有人為您的網站添加了書簽?)
Use of Different .Net Languages?(使用不同的 .Net 語言?)
Determining an #39;active#39; user count of an ASP.NET site(確定 ASP.NET 站點的“活動用戶數)
Best way to keep track of current online users(跟蹤當前在線用戶的最佳方式)
Recommend an Open Source .NET Statistics Library(推薦一個開源的.NET統計庫)
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
主站蜘蛛池模板: 成人亚洲性情网站www在线观看 | 国产韩国精品一区二区三区 | 国产精品久久久久影院色老大 | 97人人澡人人爽91综合色 | 精品国产欧美一区二区 | 欧美日韩国产中文 | 成人网av| 国产一区二区自拍 | 色在线免费 | 成人国产精品久久久 | 国产一区二区三区 | 欧美日韩亚洲视频 | 国产在线不卡视频 | 亚洲精品一区二区三区在线 | 欧美激情一区二区三区 | 国产精品毛片久久久久久久 | 三级免费毛片 | 仙人掌旅馆在线观看 | 一级毛片播放 | 国产成人精品免费视频大全最热 | 青青草社区 | 动漫www.被爆羞羞av44 | 国产成人一区二 | 久久91精品久久久久久9鸭 | 精品国产一区二区三区久久 | 欧美日韩不卡 | a级在线免费观看 | 三级特黄特色视频 | 欧美日韩精品一区二区三区四区 | 性高湖久久久久久久久 | 国产福利91精品一区二区三区 | a爱视频 | 天天草视频| 国产欧美日韩一区二区三区在线 | 国产精品久久久久久久久久久免费看 | 欧美第一页 | 欧美中文在线 | 中文字幕在线网 | 日本一二三区高清 | 日韩成人在线一区 | xxxxx黄色片 欧美一区免费 |