Преглед изворни кода

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 пре 2 година
родитељ
комит
615a7989fa
1 измењених фајлова са 3 додато и 1 уклоњено
  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') ) {