2013-02-08 192 views
5

作爲構建步驟的一部分,我發佈構建,我想訪問特定構建的變更日誌。特別是git提交消息。訪問Teamcity git在構建步驟中更改日誌

我不知道如果我可以通過git在構建步驟中做到這一點,或使更改日誌我可以訪問的參數。任何幫助表示讚賞。

回答

4

git log可能是你的答案:

[email protected]$ git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short 
* 8e11818 2013-02-05 | Add first rough prototype of json controller. Add naive first model as a placeholder. Add separate contexts 
* 6570201 2013-01-30 | Remove DAO layer. Preparation for graph data layer. [4n3w] 
* a079c87 2013-01-30 | Cleanup. Wish I had more time for this! [4n3w] 

編輯:我發現這個How to compose git log for pending changes in TeamCIty這可能是你試圖做一個副本。

+0

我會調查謝謝 – 2013-02-12 10:23:14

+1

這幾乎正是我所需要的,我在編輯中正確地配置了鏈接,正確配置了teamcity,獲得了正確的項目ID並將它設置爲在我們的CI上運行。附註:如果您在teamcity上啓用了訪客帳戶,則可以使用-user guest:guest捲曲以訪問。構建數據可通過客人訪問。另外,如果你無論如何無法讓git工作,提交消息可以在teamcity的xml API中找到,並且可以通過幾個鏈接進行跟蹤。 – 2013-02-12 13:39:22

相關問題