第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

git log --name-status HEAD ^ .. HEAD在Mac上顯示先前的提交

git log --name-status HEAD ^ .. HEAD在Mac上顯示先前的提交

溫溫醬 2021-04-01 12:45:34
我在Mac上進(jìn)行開(kāi)發(fā),但是我有Windows VM,最終無(wú)法運(yùn)行某些版本。非常簡(jiǎn)單。我讓詹金斯(Jenkins)拉并每天構(gòu)建該應(yīng)用程序。在此腳本中,我需要獲取一些元數(shù)據(jù)。我需要獲取git服務(wù)器上分支的列表,如果有的話(因?yàn)榉种Э赡軟](méi)有提交),則需要最新提交的元數(shù)據(jù)。特別是提交者的電子郵件。通常,在我的Mac上,它很簡(jiǎn)單:git branch --all > branchesfor b in $(cat branches);do  git checkout $b  git log --name-status HEAD^..HEAD | grep Author | cut -d"<" -f2 | cut -d">" -f1 > email  echo $b > branch  python buildScript.py $(cat email) $(cat branch)  ; donerm email branchmv branches old_branches我注意到的問(wèn)題是:在分支的新分支上,git log --name-status顯示了提交,但HEAD ^ .. HEAD未返回任何結(jié)果。grep在Windows Cmd提示中不是有效的cmd。在Windows Cmd提示中,cut不是有效的cmd。我可能會(huì)找到grep并削減替代方案。有人可以解釋為什么提交不會(huì)顯示在Windows上嗎?是否有內(nèi)置的Python Utility可以在其中處理所有問(wèn)題?我沒(méi)有直接運(yùn)行bash的問(wèn)題,但是我認(rèn)為python可以更加干凈,因?yàn)槲乙呀?jīng)在運(yùn)行python腳本來(lái)構(gòu)建...編輯:我想要的最終狀態(tài)是bash腳本(或python腳本),其操作如下:loop over all branches.if branch is new since the last time the script was run, and has at least 1 commit   run_a_python_script with the committers email and that branch.else if there were deleted branches since the last time it was run:   run_another_python_script with the branchelse   nothing happens because this script already ran once.我將其設(shè)置為每10分鐘間隔一次。這很容易在Python或Bash中完成。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 262 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)