Skip to content

Commit

Permalink
fix: refactor command
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed May 22, 2024
1 parent 2947f15 commit a0f4a7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backport-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
git fetch --all
- name: Get all release branches # e.g release/v1.7
run: |
RELEASE_BRANCHES=$(git branch -r | grep 'origin/release/v[0-9]\+\.[0-9]\+' | sed 's/origin\//g')
if [ -z ${RELEASE_BRANCHES} ]; then
RELEASE_BRANCHES=$(git branch -r | tr -d ' ' | grep '^origin/release/v[0-9]\+\.[0-9]\+' | sed 's/origin\///g' | tr '\n' ' ' | sed 's/ $//')
if [ -z "${RELEASE_BRANCHES}" ]; then
echo "There are no release branches."
exit 0
fi
for branch in ${RELEASE_BRANCHES}; do
for branch in "${RELEASE_BRANCHES}"; do
echo "branch = ${branch}"
done
# - name: Fetch PR info
Expand Down

0 comments on commit a0f4a7d

Please sign in to comment.