Skip to content

Commit fb03e62

Browse files
authored
Nuget - Prefer APPVEYOR_REPO_BRANCH (#4765)
because AppVeyor checks out a commit rather than a branch appveyor/ci#1606
1 parent 9ac8b88 commit fb03e62

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#requires -Version 5
1+
#requires -Version 5
22

33
param(
44
[ValidateSet("vs2022","vs2019", "nupkg-only", "update-build-version")]
@@ -272,6 +272,11 @@ function Nupkg
272272
$gitBranch = git rev-parse --abbrev-ref HEAD
273273
$gitCommit = git rev-parse HEAD
274274

275+
if (Test-Path Env:\APPVEYOR_REPO_BRANCH) # https://github.com/appveyor/ci/issues/1606
276+
{
277+
$gitBranch = $env:APPVEYOR_REPO_BRANCH
278+
}
279+
275280
Write-Diagnostic "Building nuget package for $gitCommit on $gitBranch"
276281

277282
# Build packages

0 commit comments

Comments
 (0)