Wrap noisy calls to git within cmd.exe invocation

This commit is contained in:
Daniel Donenfeld 2019-02-15 18:41:03 -08:00
parent 801422759c
commit 096d572749
2 changed files with 7 additions and 6 deletions

View File

@ -166,7 +166,7 @@ on_finish:
$branchName = "asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId)" $branchName = "asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId)"
git ls-remote --heads --exit-code https://github.com/dadonenf/GSL.git $branchName git ls-remote --heads --exit-code https://github.com/dadonenf/GSL.git $branchName
if($?){ if($?){
git push origin --delete asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId) 2>&1 cmd.exe /c "git push origin --delete asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId) 2>&1"
} }
} }
} }

View File

@ -6,7 +6,7 @@ function collectAsm {
git fetch --all 2>&1 git fetch --all 2>&1
$asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final" $asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final"
git checkout -b $asmFinalBranch $env:APPVEYOR_REPO_BRANCH cmd.exe /c "git checkout -b $($asmFinalBranch) $($env:APPVEYOR_REPO_BRANCH) 2>&1"
#merge all branches into final branch #merge all branches into final branch
(Get-AppVeyorBuild).build.jobs | Foreach-Object { (Get-AppVeyorBuild).build.jobs | Foreach-Object {
@ -18,19 +18,20 @@ function collectAsm {
throw "Missing branch for job $($_.jobId)" throw "Missing branch for job $($_.jobId)"
} }
git merge $branchName 2>&1 cmd.exe /c "git merge $($branchName) 2>&1"
} }
#Merge all branches into master #Merge all branches into master
git checkout master 2>&1 git checkout master 2>&1
cmd.exe /c "git merge --squash $($asmFinalBranch)" cmd.exe /c "git merge --squash $($asmFinalBranch) 2>&1"
if(-not $?){ if(-not $?){
throw "Failed merge" throw "Failed merge"
} }
git diff-index --cached --quiet --exit-code HEAD git diff-index --cached --quiet --exit-code HEAD
if(-not $?) { if(-not $?) {
git commit -m "[skip ci] Update ASM for $($env:APPVEYOR_REPO_COMMIT)" git commit -m "[skip ci] Update ASM for $($env:APPVEYOR_REPO_COMMIT)"
git push cmd.exe /c "git push 2>&1"
} }
} }