File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 5151 $FILES_URL \
5252 | jq -r --arg prefix $BRANCH_NAME/ '.[] | select(((.filename | test("content\/.+\\.md")) and .status != "removed")) | ($prefix + .filename)' \
5353 | sed -E -e 's|(^[^/]+/)([^/]+/)|\1|' -e 's|^|https://redis.io/docs/staging/|' -e 's|(_?index)?\.md||' \
54- | uniq \
55- | xargs \
56- | sed 's/ /<br>/g')
54+ | sort \
55+ | uniq)
5756
5857 # Get all changed image files
5958 CHANGED_IMAGE_FILES=$(curl -Ls \
@@ -70,14 +69,19 @@ jobs:
7069 for CHANGED_IMAGE_FILE in $CHANGED_IMAGE_FILES; do
7170 MD_FILE_WITH_IMAGE=$(grep -ro "$CHANGED_IMAGE_FILE" content \
7271 | sed -E -e 's|:.+||' -e "s|^content/|https://redis.io/docs/staging/$BRANCH_NAME/|" -e 's|(_?index)?\.md||' \
72+ | sort \
7373 | uniq)
7474 MD_FILES_WITH_IMAGE+=($MD_FILE_WITH_IMAGE)
7575 done
76- CHANGED_MD_FILES_WITH_IMAGE=$(printf "%s\n" "${MD_FILES_WITH_IMAGE[@]}" \
76+ CHANGED_MD_FILES=$(printf "%s\n" "${CHANGED_MD_FILES}" "${MD_FILES_WITH_IMAGE[@]}" \
77+ | sort \
7778 | uniq \
7879 | xargs \
7980 | sed 's/ /<br>/g')
80- CHANGED_MD_FILES="${CHANGED_MD_FILES}<br>${CHANGED_MD_FILES_WITH_IMAGE}"
81+ else
82+ CHANGED_MD_FILES=$(printf "%s\n" "${CHANGED_MD_FILES}" \
83+ | xargs \
84+ | sed 's/ /<br>/g')
8185 fi
8286
8387 if [[ -z "$CHANGED_MD_FILES" ]]
You can’t perform that action at this time.
0 commit comments