Parcourir la source

Correct parsing of minor version in build workflow

This commit corrects the code used to parse out and increment the minor version number from the latest software release tag. The previous implementation attempted to call a non-existent function and has been replaced with the proper method for substring extraction from a string.
DerSkythe il y a 2 ans
Parent
commit
615a7989fa
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      .github/workflows/build-with-firmwware.yml

+ 3 - 1
.github/workflows/build-with-firmwware.yml

@@ -105,9 +105,11 @@ jobs:
           if ( [string]::IsNullOrWhitespace($env:INPUT_VERSION) ) {
             $latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
             $lastIndex = $latestTag.LastIndexOf('.')
-            $minorValue = $latestTag($latestTag.LastIndexOf('.'))
+            
+            $minorValue = $latestTag.Substring($latestTag.LastIndexOf('.'))
             $minorValue = [Convert]::ToInt32($minorValue) + 1
             $latestTag = $latestTag.Substring(0, $lastIndex)
+            
             $releaseVersion = ('{0}.{1}', $latestTag, $minorValue)
           }
           if ( $releaseVersion.StartsWith('v') ) {