소스 검색

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') ) {