mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Try to merge commits individually into final branch, then squash
This commit is contained in:
parent
8e6d1a4fe7
commit
d02a3a8795
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user