Skip to content

Commit 3b7536c

Browse files
authored
Make the script work when there are no tags for the release yet (#43059)
Closes #43057 Signed-off-by: Alexander Schwartz <[email protected]>
1 parent 1d986f6 commit 3b7536c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/version-compatibility.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ ALL_RELEASES=$(gh release list \
2020
--template '{{range .}}{{.name}}{{"\n"}}{{end}}'
2121
)
2222
MAJOR_MINOR=${TARGET_BRANCH#"release/"}
23-
MAJOR_MINOR_RELEASES=$(echo "${ALL_RELEASES}" | grep "${MAJOR_MINOR}")
23+
MAJOR_MINOR_RELEASES=$(echo "${ALL_RELEASES}" | (grep "${MAJOR_MINOR}" || true))
2424

25-
echo "${MAJOR_MINOR_RELEASES}" | jq -cnR '[inputs] | map({version: .})'
25+
echo -n "${MAJOR_MINOR_RELEASES}" | jq -cnR '[inputs] | map({version: .})'

0 commit comments

Comments
 (0)