Skip to content

Commit

Permalink
Update version handling in firmware build workflow
Browse files Browse the repository at this point in the history
This commit updates the way version input is handled and formatted in the firmware build workflow. This is mainly done by ensuring the input version is properly encapsulated as a string and updating the release version tag so that the minor version parsing is accurate.
  • Loading branch information
derskythe committed Dec 19, 2023
1 parent 54a98f9 commit 0802191
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-with-firmwware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
INPUT_VERSION: ${{ inputs.version }}
run: |
Write-Output "::notice title=Version Number::v${{ inputs.version }}"
$fwInfo = ((gh release view --json tagName,url -R ${{ matrix.url }}) | ConvertFrom-Json)
cd '${{ env.APP_PATH }}'
$sha = (git rev-parse --verify HEAD)
$releaseVersion = $env:INPUT_VERSION
$releaseVersion = "$env:INPUT_VERSION"
if ( [string]::IsNullOrWhitespace($env:INPUT_VERSION) ) {
$latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
Expand All @@ -108,7 +109,7 @@ jobs:
$minorValue = [Convert]::ToInt32($minorValue) + 1
$latestTag = $latestTag.Substring(0, $lastIndex)
$releaseVersion = ('{0}.{1}', $latestTag, $minorValue)
$releaseVersion = ('{0}.{1}', $latestTag, $minorValue.ToString())
}
if ( $releaseVersion.StartsWith('v') ) {
$releaseVersion = $releaseVersion.Substring(1)
Expand Down

0 comments on commit 0802191

Please sign in to comment.