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

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

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

問題描述

我和我的團(tuán)隊(duì)在增加程序集版本號方面非常糟糕,而且我們經(jīng)常發(fā)布 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 平臺,我們的實(shí)踐變得更好了,我會真的很喜歡將其設(shè)置為自動(dòng)增加 assemblyinfo.cs 文件中的值,以便我們的程序集版本隨著該程序集中的代碼更改自動(dòng)更新.

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.

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

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 增加版本號是個(gè)壞主意嗎?有什么替代方法可以做到這一點(diǎn)?

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

理想情況下,我的解決方案標(biāo)準(zhǔn)應(yīng)該是:

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

  • 在構(gòu)建之前增加 assemblyinfo.cs 中的構(gòu)建號
  • 僅增加已更改程序集中的內(nèi)部版本號.這可能是不可能的,因?yàn)?Hudson 每次構(gòu)建時(shí)都會清除項(xiàng)目文件夾
  • 將更改后的 assemblyinfo.cs 提交到代碼庫(當(dāng)前為 VisualSVN)
  • 不會導(dǎo)致 Hudson 在下次掃描更改時(shí)觸發(fā)新構(gòu)建

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

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.

到目前為止,我發(fā)現(xiàn)的所有內(nèi)容都只是一篇解釋如何讓版本號自動(dòng)遞增的文章,沒有考慮到可能陷入無限循環(huán)的 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.

推薦答案

一個(gè)簡單的替代方法是讓 C# 環(huán)境通過將 version 屬性設(shè)置為 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.

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

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.*")]

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

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

相關(guān)文檔推薦

Is there a way to know if someone has bookmarked your website?(有沒有辦法知道是否有人為您的網(wǎng)站添加了書簽?)
Use of Different .Net Languages?(使用不同的 .Net 語言?)
Determining an #39;active#39; user count of an ASP.NET site(確定 ASP.NET 站點(diǎn)的“活動(dòng)用戶數(shù))
Best way to keep track of current online users(跟蹤當(dāng)前在線用戶的最佳方式)
Recommend an Open Source .NET Statistics Library(推薦一個(gè)開源的.NET統(tǒng)計(jì)庫)
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
主站蜘蛛池模板: 99re久久| 天天综合久久 | 国产精品观看 | 一区二区国产精品 | 亚洲精品美女 | 亚洲麻豆视频 | 香蕉视频在线观看网站 | 亚洲伊人影院 | 欧美一级视频 | 三级黄色 | 草逼视频免费看 | www.在线播放| 可以看毛片的网站 | 伊人网视频 | 国产精品入口夜色视频大尺度 | 91一级片 | 欧美精品xxx| 午夜激情福利视频 | 91精品国产综合久久久蜜臀九色 | 吃奶动态图 | 日韩在线视频观看 | 一级毛片免费播放 | 一区二区国产精品 | 国产视频99 | 国产香蕉av| 欧美一区二区三区在线观看 | 成人在线小视频 | 日韩国产精品视频 | 天天做天天爱 | 欧美一区二区精品 | 张津瑜国内精品www在线 | 一区二区三区四区国产 | 欧美不卡在线 | 女人av在线 | 色av网| 欧美日韩精品久久久免费观看 | 久久久久久亚洲 | 欧美三级免费 | 精品一区av | 91成人免费版 | 香蕉视频一区二区 |