Skip to content

Commit 16771ea

Browse files
committed
Try to appease AV
1 parent cc7f672 commit 16771ea

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

build.ps1

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,27 @@ $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
1414

1515
$CefSln = Join-Path $WorkingDir 'CefSharp3.sln'
1616

17+
function Write-Diagnostic
18+
{
19+
param(
20+
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
21+
[string] $Message
22+
)
23+
24+
Write-Host
25+
Write-Host $Message -ForegroundColor Green
26+
Write-Host
27+
}
28+
1729
if (Test-Path Env:\APPVEYOR_BUILD_VERSION)
1830
{
1931
$Version = $env:APPVEYOR_BUILD_VERSION
2032
}
2133

22-
if (Test-Path Env:\APPVEYOR_REPO_TAG)
34+
if ($env:APPVEYOR_REPO_TAG -eq "True")
2335
{
2436
$Version = "$env:APPVEYOR_REPO_BRANCH".Substring(1) # trim leading "v"
37+
Write-Diagnostic "Setting version based on tag to $Version"
2538
}
2639

2740
# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
@@ -48,18 +61,6 @@ function Invoke-BatchFile
4861
Remove-Item $tempFile
4962
}
5063

51-
function Write-Diagnostic
52-
{
53-
param(
54-
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
55-
[string] $Message
56-
)
57-
58-
Write-Host
59-
Write-Host $Message -ForegroundColor Green
60-
Write-Host
61-
}
62-
6364
function Die
6465
{
6566
param(

0 commit comments

Comments
 (0)