Skip to content

Commit

Permalink
fix logic error (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
evandcoleman authored Sep 30, 2024
1 parent ec72420 commit b20cea4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ latest_release_number () {

branch_exists () {
# Check if the branch exists on the remote
git ls-remote --heads origin "$1" 2>/dev/null | grep -q "$1" || echo 0
ret=$(git ls-remote --heads origin "$1" 2>/dev/null | grep -q "$1"; echo $?)
if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
}

pr_exists_and_open () {
# Check if the PR exists and is open on the remote
gh pr view $1 --json state | jq -r '.state' | grep -q "OPEN" || echo 0
ret=$(gh pr view $1 --json state | jq -r '.state' | grep -q "OPEN"; echo $?)
if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
}

is_pr_approved () {
# Check if the PR needs review
gh pr view $1 --json reviewDecision | jq -r '.reviewDecision' | grep -q "APPROVED" || echo 0
ret=$(gh pr view $1 --json reviewDecision | jq -r '.reviewDecision' | grep -q "APPROVED"; echo $?)
if [ $ret -eq 0 ]; then echo 1; else echo 0; fi
}

xcframework_name () {
Expand Down

0 comments on commit b20cea4

Please sign in to comment.