Browse Source

Support both AppVeyor and Pipelines in assembly info script

pull/1522/head
Oren Novotny 6 years ago
parent
commit
40053ccebf
Failed to extract signature
  1. 4
      BuildTools/update-assemblyinfo.ps1

4
BuildTools/update-assemblyinfo.ps1

@ -57,7 +57,9 @@ function gitBranch() { @@ -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);

Loading…
Cancel
Save