You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/09/07 11:59:45 UTC

(skywalking-graalvm-distro) branch main updated: Report dirty paths in release preflight checks (#32)

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

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git


The following commit(s) were added to refs/heads/main by this push:
     new 56e8c22  Report dirty paths in release preflight checks (#32)
56e8c22 is described below

commit 56e8c22d61717a1cd466fce86e0ef1cc3750597f
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Sep 7 19:59:39 2026 +0800

    Report dirty paths in release preflight checks (#32)
---
 release/full-release.sh | 14 ++++++++++++--
 release/pre-release.sh  | 14 ++++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/release/full-release.sh b/release/full-release.sh
index 03e48bf..7a1eead 100755
--- a/release/full-release.sh
+++ b/release/full-release.sh
@@ -49,8 +49,18 @@ CURRENT_BRANCH=$(git branch --show-current)
 [[ "${CURRENT_BRANCH}" == "main" ]] \
     || error "Must be on 'main' branch (currently on '${CURRENT_BRANCH}')"
 
-[[ -z "$(git status --porcelain)" ]] \
-    || error "Working tree is not clean. Commit or stash changes first."
+# Use config so untracked-file visibility also propagates to submodule checks.
+WORKTREE_STATUS=$(git -c status.showUntrackedFiles=all status --porcelain --ignore-submodules=none)
+if [[ -n "${WORKTREE_STATUS}" ]]; then
+    printf 'Uncommitted changes (paths relative to repository root):\n%s\n' "${WORKTREE_STATUS}" >&2
+    git submodule foreach --quiet --recursive '
+        status=$(git -c status.showUntrackedFiles=all status --porcelain --ignore-submodules=none) || exit
+        if [ -n "$status" ]; then
+            printf "\nSubmodule %s (paths relative to this submodule):\n%s\n" "$displaypath" "$status"
+        fi
+    ' >&2
+    error "Working tree is not clean. Commit, stash, or remove the paths listed above first."
+fi
 
 git fetch origin main --quiet
 LOCAL_SHA=$(git rev-parse HEAD)
diff --git a/release/pre-release.sh b/release/pre-release.sh
index ba729fc..055bc29 100755
--- a/release/pre-release.sh
+++ b/release/pre-release.sh
@@ -30,8 +30,18 @@ cd "${REPO_ROOT}"
 CURRENT_BRANCH=$(git branch --show-current)
 [[ "${CURRENT_BRANCH}" == "main" ]] || error "Must be on main branch (currently on '${CURRENT_BRANCH}')"
 
-# Check for uncommitted changes
-[[ -z "$(git status --porcelain)" ]] || error "Working tree is not clean. Commit or stash changes first."
+# Use config so untracked-file visibility also propagates to submodule checks.
+WORKTREE_STATUS=$(git -c status.showUntrackedFiles=all status --porcelain --ignore-submodules=none)
+if [[ -n "${WORKTREE_STATUS}" ]]; then
+    printf 'Uncommitted changes (paths relative to repository root):\n%s\n' "${WORKTREE_STATUS}" >&2
+    git submodule foreach --quiet --recursive '
+        status=$(git -c status.showUntrackedFiles=all status --porcelain --ignore-submodules=none) || exit
+        if [ -n "$status" ]; then
+            printf "\nSubmodule %s (paths relative to this submodule):\n%s\n" "$displaypath" "$status"
+        fi
+    ' >&2
+    error "Working tree is not clean. Commit, stash, or remove the paths listed above first."
+fi
 
 # ─── Read current version from root pom.xml ──────────────────────────────────
 CURRENT_VERSION=$(sed -n 's/.*<version>\(.*\)<\/version>.*/\1/p' "${REPO_ROOT}/pom.xml" | head -1)