From d02a3a87951269a702b5c0b5ad685ce9d8709a7a Mon Sep 17 00:00:00 2001 From: Daniel Donenfeld Date: Fri, 15 Feb 2019 18:30:41 -0800 Subject: [PATCH] Try to merge commits individually into final branch, then squash --- asm/scripts/deploy-asm.ps1 | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/asm/scripts/deploy-asm.ps1 b/asm/scripts/deploy-asm.ps1 index 8faa907..2028b60 100644 --- a/asm/scripts/deploy-asm.ps1 +++ b/asm/scripts/deploy-asm.ps1 @@ -3,13 +3,12 @@ function collectAsm { # Create branch to merge asm into - # $asmFinalBranch = asm/$env:APPVEYOR_REPO_COMMIT/final - # git pull - # git checkout $env:APPVEYOR_REPO_BRANCH - # git checkout -b $asmFinalBranch + git fetch --all 2>&1 - #collect all branches to merge - $asmBranches = @() + $asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final" + git checkout -b $asmFinalBranch $env:APPVEYOR_REPO_BRANCH + + #merge all branches into final branch (Get-AppVeyorBuild).build.jobs | Foreach-Object { $branchName = "asm/$($env:APPVEYOR_REPO_COMMIT)/appveyor-$($_.jobId)" @@ -19,26 +18,12 @@ function collectAsm { throw "Missing branch for job $($_.jobId)" } - git checkout $branchName 2>&1 - - #Add branch to the branch list - # $branchName = "origin/"+$branchName - $asmBranches += $branchName + git merge $branchName 2>&1 } - - #TODO: collect asm from travis - # $travisBuild = Get-TravisBuild - # $travisJobs = @() - # $travisBuild.jobs | Foreach-Object { $travisJobs += $_.id } - + #Merge all branches into master - $branchString = $asmBranches -join ' ' git checkout master 2>&1 - git pull - git fetch --all - git branch -a - Write-Host "git merge --squash $($branchString)" - git merge --squash $branchString + cmd.exe /c "git merge --squash $($asmFinalBranch)" if(-not $?){ throw "Failed merge" }