Skip to content

Commit

Permalink
Fix version injection in workflow script
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed May 1, 2021
1 parent 8a03218 commit b7d3cd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
$sha = $env:SHA.Substring(0, 7)
Write-Host "Writing $sha to $env:VERSION_HEADER_FILE"
$replaced = Get-Content $env:VERSION_HEADER_FILE | % { if ($_ -match '#define RADIANT_VERSION "\d+.\d+.\d+([\w\d]*)"') { $_.Replace($matches[1], "rev$sha") } else { $_ } };
$replaced = Get-Content $env:VERSION_HEADER_FILE | % { if ($_ -match '#define RADIANT_VERSION "((\d+.\d+.\d+)([\w\d]*))"') { $_.Replace($matches[1], $matches[2] + "_rev$sha") } else { $_ } };
$replaced | Out-File $env:VERSION_HEADER_FILE
shell: powershell

Expand Down

0 comments on commit b7d3cd3

Please sign in to comment.