Skip to content

Commit

Permalink
Update SemVerCalc_GitHubFlow_Actions.ps1
Browse files Browse the repository at this point in the history
Fix regex from short circuit for release tags
  • Loading branch information
AntonSmolkov authored Jun 7, 2022
1 parent bf3d346 commit 5b052bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DevOps/SemVerCalc_GitHubFlow_Actions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Author: Anton Smolkov - https://github.com/AnSmol
#$env:GITHUB_ENV = '~/github.env.lab'

#Short circuit for release tags
if ($env:REF_TYPE -eq 'tag' -and $env:REF_TYPE -cmatch "^v\d+\.\d+\.\d+$" ){
if ($env:REF_TYPE -eq 'tag' -and $env:REF_TYPE -cmatch '^v(?<Major>\d+)\.?(?<Minor>\d+)?\.?(?<Patch>\d+)?$' ){

"CALCULATED_VERSION=$env:REF_NAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"CALCULATED_VERSION_IS_RELEASE=$True" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down Expand Up @@ -89,4 +89,4 @@ if ($null -ne $VersionFromTag) {
"CALCULATED_VERSION_IS_RELEASE=$CalculatedVersionIsRelease" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

Write-Host $CalculatedVersion
#cat $env:GITHUB_ENV
#cat $env:GITHUB_ENV

0 comments on commit 5b052bc

Please sign in to comment.