You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ga...@apache.org on 2026/06/10 12:55:12 UTC

(iceberg-cpp) branch main updated: fix: make git run watch optional in release_rc.sh (#720)

This is an automated email from the ASF dual-hosted git repository.

wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new c0c6b013 fix: make git run watch optional in release_rc.sh (#720)
c0c6b013 is described below

commit c0c6b01393070b0813f49b0d6220c98256379cef
Author: Gang Wu <us...@gmail.com>
AuthorDate: Wed Jun 10 20:55:07 2026 +0800

    fix: make git run watch optional in release_rc.sh (#720)
---
 dev/release/release_rc.sh | 51 ++++++++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/dev/release/release_rc.sh b/dev/release/release_rc.sh
index fe919f2f..5f4595f2 100755
--- a/dev/release/release_rc.sh
+++ b/dev/release/release_rc.sh
@@ -44,6 +44,7 @@ rc=$2
 : "${RELEASE_PUSH_TAG:=${RELEASE_DEFAULT}}"
 : "${RELEASE_SIGN:=${RELEASE_DEFAULT}}"
 : "${RELEASE_UPLOAD:=${RELEASE_DEFAULT}}"
+: "${RELEASE_WATCH:=${RELEASE_DEFAULT}}"
 : "${RELEASE_WATCH_INTERVAL:=30}"
 
 cd "${SOURCE_TOP_DIR}"
@@ -97,29 +98,33 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then
   done
 
   echo "Found GitHub Actions workflow with ID: ${run_id}"
-  while true; do
-    run_status=$(gh run view \
-      --repo "${repository}" \
-      --json 'status,conclusion' \
-      --jq '.status + " " + (.conclusion // "")' \
-      "${run_id}")
-    echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ') GitHub Actions workflow status: ${run_status}"
-    gh run view \
-      --repo "${repository}" \
-      --json jobs \
-      --jq '.jobs[] | "  " + .name + ": " + .status + " " + (.conclusion // "")' \
-      "${run_id}"
-    case "${run_status}" in
-      "completed success")
-        break
-        ;;
-      completed\ *)
-        echo "GitHub Actions workflow did not complete successfully: ${run_status}"
-        exit 1
-        ;;
-    esac
-    sleep "${RELEASE_WATCH_INTERVAL}"
-  done
+  if [ "${RELEASE_WATCH}" -gt 0 ]; then
+    gh run watch --repo "${repository}" --exit-status "${run_id}"
+  else
+    while true; do
+      run_status=$(gh run view \
+        --repo "${repository}" \
+        --json 'status,conclusion' \
+        --jq '.status + " " + (.conclusion // "")' \
+        "${run_id}")
+      echo "$(date -u '+%Y-%m-%dT%H:%M:%SZ') GitHub Actions workflow status: ${run_status}"
+      gh run view \
+        --repo "${repository}" \
+        --json jobs \
+        --jq '.jobs[] | "  " + .name + ": " + .status + " " + (.conclusion // "")' \
+        "${run_id}"
+      case "${run_status}" in
+        "completed success")
+          break
+          ;;
+        completed\ *)
+          echo "GitHub Actions workflow did not complete successfully: ${run_status}"
+          exit 1
+          ;;
+      esac
+      sleep "${RELEASE_WATCH_INTERVAL}"
+    done
+  fi
 
   mkdir -p "${rc_id}"