From 40053ccebf3f6c5850f70fabd7641512066f1cc8 Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Tue, 4 Jun 2019 16:01:24 -0400 Subject: [PATCH] Support both AppVeyor and Pipelines in assembly info script --- BuildTools/update-assemblyinfo.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BuildTools/update-assemblyinfo.ps1 b/BuildTools/update-assemblyinfo.ps1 index 28d7dcd8f..ceb9bba11 100644 --- a/BuildTools/update-assemblyinfo.ps1 +++ b/BuildTools/update-assemblyinfo.ps1 @@ -57,7 +57,9 @@ function gitBranch() { return "no-branch"; } - if ($env:BUILD_SOURCEBRANCHNAME -ne $null) { + if ($env:APPVEYOR_REPO_BRANCH -ne $null) { + return $env:APPVEYOR_REPO_BRANCH; + } elseif ($env:BUILD_SOURCEBRANCHNAME -ne $null) { return $env:BUILD_SOURCEBRANCHNAME; } else { return ((git branch --no-color).Split([System.Environment]::NewLine) | where { $_ -match "^\* " } | select -First 1).Substring(2);