Explorar o código

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 %!s(int64=2) %!d(string=hai) anos
pai
achega
615a7989fa
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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') ) {