Skip to content

Commit

Permalink
improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid authored Apr 11, 2024
1 parent f3ccaf8 commit a6430fb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/guarantee-version-correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
$patchVersionString = $csproj.Project.PropertyGroup.PatchVersion
$version = "$majorVersionString.$minorVersionString.$patchVersionString"
$projectVersion = [Version]$version
"PROJ_VERSION=$projectVersion" | Out-File -Append -FilePath $Env:GITHUB_ENV
# Obtain latest tag
git fetch --tags
Expand All @@ -40,6 +42,8 @@ jobs:
$latestTag = $latestTag.TrimStart('v')
$minVersion = [Version]$latestTag
"MIN_VERSION=$minVersion" | Out-File -Append -FilePath $Env:GITHUB_ENV
# Split the version number by '.' character
$versionParts = $latestTag -split '\.'
Expand Down Expand Up @@ -73,13 +77,10 @@ jobs:
$tagPatch = $env:TAG_PATCH
$projPatch = $env:PROJ_PATCH
Write-Host $tagPatch
Write-Host $env:TAG_PATCH
# Compare the project version to the minimum required version
if ($projPatch -lt $tagPatch) {
$errorMessage = "WebJobs extension version ($projectVersion) it not" +
"a patch-release greater than the latest tag version ($minVersion)." +
$errorMessage = "WebJobs extension version ($env:PROJ_VERSION) it not" +
"a patch-release greater than the latest tag version ($env:MIN_VERSION)." +
"Please increment the patch version or remove the `patch-pr` label."
Write-Error $errorMessage
exit 1
Expand Down

0 comments on commit a6430fb

Please sign in to comment.