From b3c81356ca17fa90ded8faa96c8e5bbdc16048d7 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Tue, 5 Nov 2024 12:04:41 -0800 Subject: [PATCH] infra: release note compute 2 (#27921) --- .github/workflows/_release.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 7eaa9410beb06..6dee08c652d1a 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -106,11 +106,16 @@ jobs: PREV_TAG=$(git tag --sort=-creatordate | grep -P $REGEX || true | head -1) fi - # confirm prev-tag actually exists in git repo with git tag - GIT_TAG_RESULT=$(git tag -l "$PREV_TAG") - if [ -z "$GIT_TAG_RESULT" ]; then - echo "Previous tag $PREV_TAG not found in git repo" - exit 1 + # if PREV_TAG is empty, let it be empty + if [ -z "$PREV_TAG" ]; then + echo "No previous tag found - first release" + else + # confirm prev-tag actually exists in git repo with git tag + GIT_TAG_RESULT=$(git tag -l "$PREV_TAG") + if [ -z "$GIT_TAG_RESULT" ]; then + echo "Previous tag $PREV_TAG not found in git repo" + exit 1 + fi fi