@@ -320,8 +320,8 @@ jobs:
320320 echo "Setting reown_core to ^$CORE_VERSION"
321321 yq e ".dependencies.reown_core = \"^$CORE_VERSION\"" -i pubspec.yaml
322322 fi
323- # Update reown_sign if it was published (either by its own change or due to core change)
324- if [[ ( "${{ github.event.inputs.sign }}" == 'true' || "${{ github.event.inputs.core }}" == 'true') && -n "$SIGN_VERSION" ]]; then
323+ # Update reown_sign if it was published
324+ if [[ "${{ github.event.inputs.sign }}" == 'true' && -n "$SIGN_VERSION" ]]; then
325325 echo "Setting reown_sign to ^$SIGN_VERSION"
326326 yq e ".dependencies.reown_sign = \"^$SIGN_VERSION\"" -i pubspec.yaml
327327 fi
@@ -433,7 +433,7 @@ jobs:
433433 echo "Setting reown_core to ^$CORE_VERSION"
434434 yq e ".dependencies.reown_core = \"^$CORE_VERSION\"" -i pubspec.yaml
435435 fi
436- if [[ ( "${{ github.event.inputs.sign }}" == 'true' || "${{ github.event.inputs.core }}" == 'true') && -n "$SIGN_VERSION" ]]; then
436+ if [[ "${{ github.event.inputs.sign }}" == 'true' && -n "$SIGN_VERSION" ]]; then
437437 echo "Setting reown_sign to ^$SIGN_VERSION"
438438 yq e ".dependencies.reown_sign = \"^$SIGN_VERSION\"" -i pubspec.yaml
439439 fi
@@ -682,15 +682,13 @@ jobs:
682682 ref : ${{ needs.create-branch.outputs.branch_name }}
683683 fetch-depth : 0
684684
685- - name : Check if branch is ahead of develop
685+ - name : Check if there are any changes to commit
686686 id : check_changes
687687 run : |
688688 BRANCH_NAME="${{ needs.create-branch.outputs.branch_name }}"
689- # Fetch develop to ensure we have the latest
690- git fetch origin develop:develop
691- # Count commits in branch not in develop
692- COMMITS_AHEAD=$(git rev-list ${BRANCH_NAME} ^develop --count)
693- if [[ "$COMMITS_AHEAD" -gt 0 ]]; then
689+ git fetch origin develop
690+ COMMITS_AHEAD=$(git rev-list --count origin/develop..HEAD)
691+ if [ "$COMMITS_AHEAD" -gt 0 ]; then
694692 echo "has_changes=true" >> $GITHUB_OUTPUT
695693 echo "Branch is ahead of develop by $COMMITS_AHEAD commits, will create PR"
696694 else
0 commit comments