Skip to content

Commit 294a388

Browse files
committed
Fix Appveyor release tag detection
1 parent 5a14edc commit 294a388

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.build/setup_appveyor.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ iex ".\$env:POSTGIS_EXE /S /D='C:\Program Files\PostgreSQL\10'"
1515

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

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

0 commit comments

Comments
 (0)