Skip to content

Commit

Permalink
update workflow to handle single version case
Browse files Browse the repository at this point in the history
  • Loading branch information
buidav committed Oct 2, 2024
1 parent ab5a047 commit fba175d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/run_update_opa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ jobs:
# Then add the new version on the next line
($VersionsArr[0..($VersionsArr.Length-2)] -join ",") + ","
" '$CurrentOPAVersion', $DefaultOPAVersionVar $END_VERSIONS_COMMENT" # 4 space indentation
}
elseif ($VersionsLength -eq 1) {
# if the default version is the only acceptable version
# Make `VariableName = CurrentVersion, Default #EndVersionComment `
$VersionsArr = $_ -split "="
$VersionsArr[0] + " = '$CurrentOPAVersion'" + ", $DefaultOPAVersionVar $END_VERSIONS_COMMENT"
}
else {
# No Splitting lines; Appending new Current OPA version to acceptable version
Expand Down

0 comments on commit fba175d

Please sign in to comment.