Skip to content

Commit

Permalink
Fix Appveyor release tag detection
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Sep 9, 2018
1 parent 5a14edc commit 294a388
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .build/setup_appveyor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ iex ".\$env:POSTGIS_EXE /S /D='C:\Program Files\PostgreSQL\10'"

Set-Variable -Name TruncatedSha1 -Value $env:APPVEYOR_REPO_COMMIT.subString(0, 9)

if ($env:APPVEYOR_REPO_TAG -eq 'true' -and $env:APPVEYOR_REPO_TAG_NAME -match '^v\d+\.\d+\.\d+')
if ($env:APPVEYOR_REPO_TAG -eq 'true' -and $env:APPVEYOR_REPO_TAG_NAME -match '^v\d+\.\d+\.\d+(-(\w+))?')
{
Write-Host "Release tag detected ($env:APPVEYOR_REPO_TAG_NAME), no version suffix is set."
if ($matches[2]) {
Write-Host "Prerelease tag detected ($env:APPVEYOR_REPO_TAG_NAME), version suffix set to $($matches[2])."
Set-AppveyorBuildVariable -Name VersionSuffix -Value $matches[2]
} else {
Write-Host "Release tag detected ($env:APPVEYOR_REPO_TAG_NAME), no version suffix will be set."
}
Set-AppveyorBuildVariable -Name deploy_github_release -Value true
}
#elseif (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER)
Expand Down

0 comments on commit 294a388

Please sign in to comment.