(Hopefully) Fix issue with diffing the asm branch and slight cleanup

This commit is contained in:
Daniel Donenfeld 2019-02-27 11:46:46 -08:00
parent 3168cbd7fb
commit c89e293dc9

View File

@ -3,12 +3,11 @@
function collectAsm { function collectAsm {
cmd.exe /c "git checkout $($env:APPVEYOR_REPO_BRANCH) 2>&1" cmd.exe /c "git checkout $($env:APPVEYOR_REPO_BRANCH) 2>&1"
# Create branch to merge asm into
git fetch --all 2>&1 git fetch --all 2>&1
# Create branch to merge asm into
$asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final" $asmFinalBranch = "asm/$($env:APPVEYOR_REPO_COMMIT)/final"
cmd.exe /c "git checkout -b $($asmFinalBranch) $($env:APPVEYOR_REPO_BRANCH) 2>&1" cmd.exe /c "git checkout -b $($asmFinalBranch) $($env:APPVEYOR_REPO_COMMIT) 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 {
@ -20,15 +19,11 @@ function collectAsm {
throw "Missing branch for job $($_.jobId)" throw "Missing branch for job $($_.jobId)"
} }
#Only merge in asm if there is any change between the current branch and the final asm branch #Only merge in asm if there is any change between the current branch and the repo branch
cmd.exe /c "git diff --quiet origin/$($branchName)..$($asmFinalBranch)" cmd.exe /c "git diff-tree --quiet origin/$($branchName)..$($env:APPVEYOR_REPO_COMMIT)"
if(-not $?){ if(-not $?){
#TEMPORARY LOGGING:
Write-Host "Diffs from $($branchName), cherry-picking into asm final branch $($asmFinalBranch)"
cmd.exe /c "git diff origin/$($branchName)..$($asmFinalBranch)"
# Use cherry-pick as the asm branches only have a single commit # Use cherry-pick as the asm branches only have a single commit
cmd.exe /c "git cherry-pick origin/$($branchName) --allow-empty 2>&1" cmd.exe /c "git cherry-pick origin/$($branchName) 2>&1"
if(-not $?){ if(-not $?){
throw "Failed merge of $($branchName)" throw "Failed merge of $($branchName)"
} }