File tree Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,29 @@ $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+
1729if (Test-Path Env:\APPVEYOR_BUILD_VERSION)
1830{
1931 $Version = $env: APPVEYOR_BUILD_VERSION
2032}
2133
34+ if ($env: APPVEYOR_REPO_TAG -eq " True" )
35+ {
36+ $Version = " $env: APPVEYOR_REPO_BRANCH " .Substring(1 ) # trim leading "v"
37+ Write-Diagnostic " Setting version based on tag to $Version "
38+ }
39+
2240# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
2341function Invoke-BatchFile
2442{
@@ -43,18 +61,6 @@ function Invoke-BatchFile
4361 Remove-Item $tempFile
4462}
4563
46- function Write-Diagnostic
47- {
48- param (
49- [Parameter (Position = 0 , Mandatory = $true , ValueFromPipeline = $true )]
50- [string ] $Message
51- )
52-
53- Write-Host
54- Write-Host $Message - ForegroundColor Green
55- Write-Host
56- }
57-
5864function Die
5965{
6066 param (
You can’t perform that action at this time.
0 commit comments