Skip to content

Commit

Permalink
patch version constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid authored Apr 11, 2024
1 parent 789eaff commit 6231ae6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/guarantee-version-correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- '*'
pull_request:
branches: [ main, dev, dajusto/validate-release-notes-are-provided ]
types: [labeled, unlabeled]
paths:
- '.github/workflows/guarantee-release-notes.yml'
- '.github/workflows/guarantee-version-correctness.yml'
Expand All @@ -27,15 +26,14 @@ jobs:
$minVersion = [Version]"1.0.0" # TBD
$csprojPath = ".\src\WebJobs.Extensions.DurableTask\WebJobs.Extensions.DurableTask.csproj"
# Parse the .csproj file to find the <Version> element
# Parse the .csproj file to find the <MajorVersion> element
[xml]$csproj = Get-Content -Path $csprojPath
$projectVersionString = $csproj.Project.PropertyGroup.Version
if (-not $projectVersionString) {
Write-Error "Version tag not found in the .csproj file."
exit 1
}
$majorVersionString = $csproj.Project.PropertyGroup.MajorVersion
$minorVersionString = $csproj.Project.PropertyGroup.MinorVersion
$patchVersionString = $csproj.Project.PropertyGroup.PatchVersion
$version = "$majorVersionString.$minorVersionString.$patchVersionString"
$projectVersion = [Version]$projectVersionString
$projectVersion = [Version]$version
# Compare the project version to the minimum required version
if ($projectVersion -lt $minVersion) {
Expand Down

0 comments on commit 6231ae6

Please sign in to comment.