Try to merge commits individually into final branch, then squash

This commit is contained in:
Daniel Donenfeld 2019-02-15 18:30:41 -08:00
parent 8e6d1a4fe7
commit d02a3a8795

View File

@ -3,13 +3,12 @@
function collectAsm { function collectAsm {
# Create branch to merge asm into # Create branch to merge asm into
# $asmFinalBranch = asm/$env:APPVEYOR_REPO_COMMIT/final git fetch --all 2>&1
# git pull
# git checkout $env:APPVEYOR_REPO_BRANCH
# git checkout -b $asmFinalBranch
#collect all branches to merge $asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final"
$asmBranches = @() git checkout -b $asmFinalBranch $env:APPVEYOR_REPO_BRANCH
#merge all branches into final branch
(Get-AppVeyorBuild).build.jobs | Foreach-Object { (Get-AppVeyorBuild).build.jobs | Foreach-Object {
$branchName = "asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId)" $branchName = "asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId)"
@ -19,26 +18,12 @@ function collectAsm {
throw "Missing branch for job $($_.jobId)" throw "Missing branch for job $($_.jobId)"
} }
git checkout $branchName 2>&1 git merge $branchName 2>&1
#Add branch to the branch list
# $branchName = "origin/"+$branchName
$asmBranches += $branchName
} }
#TODO: collect asm from travis
# $travisBuild = Get-TravisBuild
# $travisJobs = @()
# $travisBuild.jobs | Foreach-Object { $travisJobs += $_.id }
#Merge all branches into master #Merge all branches into master
$branchString = $asmBranches -join ' '
git checkout master 2>&1 git checkout master 2>&1
git pull cmd.exe /c "git merge --squash $($asmFinalBranch)"
git fetch --all
git branch -a
Write-Host "git merge --squash $($branchString)"
git merge --squash $branchString
if(-not $?){ if(-not $?){
throw "Failed merge" throw "Failed merge"
} }