Bläddra i källkod

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 år sedan
förälder
incheckning
615a7989fa
1 ändrade filer med 3 tillägg och 1 borttagningar
  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) ) {
           if ( [string]::IsNullOrWhitespace($env:INPUT_VERSION) ) {
             $latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
             $latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
             $lastIndex = $latestTag.LastIndexOf('.')
             $lastIndex = $latestTag.LastIndexOf('.')
-            $minorValue = $latestTag($latestTag.LastIndexOf('.'))
+            
+            $minorValue = $latestTag.Substring($latestTag.LastIndexOf('.'))
             $minorValue = [Convert]::ToInt32($minorValue) + 1
             $minorValue = [Convert]::ToInt32($minorValue) + 1
             $latestTag = $latestTag.Substring(0, $lastIndex)
             $latestTag = $latestTag.Substring(0, $lastIndex)
+            
             $releaseVersion = ('{0}.{1}', $latestTag, $minorValue)
             $releaseVersion = ('{0}.{1}', $latestTag, $minorValue)
           }
           }
           if ( $releaseVersion.StartsWith('v') ) {
           if ( $releaseVersion.StartsWith('v') ) {