Skip to content

Commit

Permalink
Check existence of the correct variable in compatibility-check (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM authored Oct 24, 2024
1 parent 24f2d7a commit 0ea46cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/actions/check-compatible-swift/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ runs:
swift_is_compatible=$((( ${package_version} <= ${toolchain_version} )) && echo true || echo false)
if [[ "$(uname)" == "Darwin" ]]; then
platform_version=$(parse_version $(swift package dump-package | jq -r '.platforms[] | select(.platformName == "macos") | .version'))
if [[ "${platform_version}" == "null" || -z "${platform_version}" ]]; then
raw_platfrom_version=$(swift package dump-package | jq -r '.platforms[] | select(.platformName == "macos") | .version')
if [[ "${raw_platfrom_version}" == "null" || -z "${raw_platfrom_version}" ]]; then
platform_is_compatible=true
else
platform_version=$(parse_version ${raw_platfrom_version})
current_platform=$(parse_version $(sw_vers -productVersion))
platform_is_compatible=$((( ${platform_version} <= ${current_platform} )) && echo true || echo false)
fi
Expand Down

0 comments on commit 0ea46cb

Please sign in to comment.