From 7450a19a8e8ede3b37e73e6aad99f6b73694f244 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Oct 2017 11:14:49 +0200 Subject: [PATCH] Add PR suffix in BuildTools/appveyor-install.ps1 --- BuildTools/appveyor-install.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/BuildTools/appveyor-install.ps1 b/BuildTools/appveyor-install.ps1 index ec98f7bcf..58b1801f9 100644 --- a/BuildTools/appveyor-install.ps1 +++ b/BuildTools/appveyor-install.ps1 @@ -23,9 +23,14 @@ if ($env:APPVEYOR_REPO_BRANCH -ne 'master') { } else { $branch = ""; } +if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { + $suffix = "-pr$env:APPVEYOR_PULL_REQUEST_NUMBER"; +} else { + $suffix = ""; +} $revision = [Int32]::Parse((git rev-list --count "$baseCommit..HEAD")) + $baseCommitRev; $newVersion="$major.$minor.$build.$revision"; -$env:appveyor_build_version="$newVersion$branch$versionName"; -appveyor UpdateBuild -Version "$newVersion$branch$versionName"; \ No newline at end of file +$env:appveyor_build_version="$newVersion$branch$versionName$suffix"; +appveyor UpdateBuild -Version "$newVersion$branch$versionName$suffix"; \ No newline at end of file