From 30092d9f6f12299a15c6e70fc3af42bb1b3b42dc Mon Sep 17 00:00:00 2001 From: Daniel Donenfeld Date: Tue, 26 Feb 2019 16:47:35 -0800 Subject: [PATCH] Only cherry-pick if there are asm diffs --- asm/scripts/deploy-asm.ps1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/asm/scripts/deploy-asm.ps1 b/asm/scripts/deploy-asm.ps1 index 75f9aae..b919331 100644 --- a/asm/scripts/deploy-asm.ps1 +++ b/asm/scripts/deploy-asm.ps1 @@ -18,10 +18,14 @@ function collectAsm { throw "Missing branch for job $($_.jobId)" } - # Use cherry-pick as the asm branches only have a single commit - cmd.exe /c "git cherry-pick origin/$($branchName) --allow-empty 2>&1" + #Only merge in asm if there is any change between the current branch and the final asm branch + cmd.exe /c "git diff --quiet $($branchName)..$($asmFinalBranch)" if(-not $?){ - throw "Failed merge of $($branchName)" + # Use cherry-pick as the asm branches only have a single commit + cmd.exe /c "git cherry-pick origin/$($branchName) --allow-empty 2>&1" + if(-not $?){ + throw "Failed merge of $($branchName)" + } } }