diff --git a/ci/scripts/release.sh b/ci/scripts/release.sh index 1596d44518cd3..497536ed4c5d8 100755 --- a/ci/scripts/release.sh +++ b/ci/scripts/release.sh @@ -94,7 +94,9 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then dnf install -y gh echo "--- Release create" + set +e response=$(gh api repos/risingwavelabs/risingwave/releases/tags/${BUILDKITE_TAG} 2>&1) + set -euo pipefail if [[ $response == *"Not Found"* ]]; then echo "Tag ${BUILDKITE_TAG} does not exist. Creating release..." gh release create "${BUILDKITE_TAG}" --notes "release ${BUILDKITE_TAG}" -d -p @@ -116,7 +118,7 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then echo "--- Release upload risingwave-all-in-one asset" tar -czvf risingwave-"${BUILDKITE_TAG}"-${ARCH}-unknown-linux-all-in-one.tar.gz risingwave libs - gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-{ARCH}-unknown-linux-all-in-one.tar.gz + gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-${ARCH}-unknown-linux-all-in-one.tar.gz fi