Skip to content

Commit de1bde4

Browse files
authored
fix: Add guard around LATEST_XTS_PASS_TAG (#18687)
Signed-off-by: Roger Barker <[email protected]>
1 parent 2a2a1f5 commit de1bde4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/zxcron-extended-test-suite.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,13 @@ jobs:
8181
fi
8282
8383
# Get the list of commits between the previous XTS Pass and the current commit
84+
COMMIT_LIST=""
8485
LATEST_XTS_PASS_TAG=$(git tag --list --sort=-version:refname "xts-pass-*" | head --lines 1)
85-
LATEST_XTS_PASS_COMMIT=$(git rev-list -n 1 "${LATEST_XTS_PASS_TAG}")
86-
COMMIT_LIST=$(git log --oneline --pretty=format:"%ad - %an <%ae>: %H" --date=short "${LATEST_XTS_PASS_COMMIT}..${XTS_COMMIT}")
86+
if [[ -n "${LATEST_XTS_PASS_TAG}" ]]; then
87+
echo "Latest XTS Pass Tag: ${LATEST_XTS_PASS_TAG}"
88+
LATEST_XTS_PASS_COMMIT=$(git rev-list -n 1 "${LATEST_XTS_PASS_TAG}")
89+
COMMIT_LIST=$(git log --oneline --pretty=format:"%ad - %an <%ae>: %H" --date=short "${LATEST_XTS_PASS_COMMIT}..${XTS_COMMIT}")
90+
fi
8791
8892
# Check if the tag exists on the main branch
8993
set +e

0 commit comments

Comments
 (0)