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-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new b14ee40  release: portable source tarball — git archive + plain tar, 
no GNU --transform
b14ee40 is described below

commit b14ee409744d4e7cb0b4b51f4884c55ea8e7876d
Author: Wu Sheng <[email protected]>
AuthorDate: Thu May 21 23:09:31 2026 +0800

    release: portable source tarball — git archive + plain tar, no GNU 
--transform
    
    Step 9 used GNU tar's --transform to rename the tarball root, which bsdtar
    (macOS default) rejects. Build the source tarball with `git archive`
    (--prefix sets the root dir) piped through plain `tar -xf`/`-czf`, so it
    works the same on macOS and Linux. As a bonus the tarball now contains
    exactly the committed files at the tag (git archive emits only tracked
    files), still dropping the ASF-infra CI publish workflow.
---
 scripts/release.sh | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/scripts/release.sh b/scripts/release.sh
index a1468bb..9454d1d 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -288,22 +288,20 @@ echo "Pushed release branch ${RELEASE_BRANCH_NAME} + tag 
${TAG} (tag → release
 note "Step 9 — Build source tarball"
 
 SRC_TAR="${WORK_DIR}/${PRODUCT_NAME}-${RELEASE_VERSION}-src.tar.gz"
-# A "source release" is the canonical Apache artifact. It must be buildable
-# from scratch — no node_modules, no dist, no editor leftovers.
-tar -C "${WORK_DIR}" \
-    --exclude='skywalking-horizon-ui/.git' \
-    --exclude='skywalking-horizon-ui/.github/workflows/publish-image.yaml' \
-    --exclude='skywalking-horizon-ui/node_modules' \
-    --exclude='skywalking-horizon-ui/**/node_modules' \
-    --exclude='skywalking-horizon-ui/dist' \
-    --exclude='skywalking-horizon-ui/**/dist' \
-    --exclude='skywalking-horizon-ui/_deploy_tmp' \
-    --exclude='skywalking-horizon-ui/.DS_Store' \
-    --exclude='skywalking-horizon-ui/**/.DS_Store' \
-    --exclude='skywalking-horizon-ui/.release-work' \
-    --transform 
"s,^skywalking-horizon-ui,${PRODUCT_NAME}-${RELEASE_VERSION}-src," \
-    -czf "${SRC_TAR}" \
-    skywalking-horizon-ui
+SRC_STAGE_NAME="${PRODUCT_NAME}-${RELEASE_VERSION}-src"
+# A "source release" is the canonical Apache artifact: exactly the committed
+# files at the release tag — no .git, no node_modules, no dist, no editor
+# leftovers (git archive emits only tracked files, which excludes all of
+# those by .gitignore). We stage via `git archive` (portable — git does the
+# archiving) then repackage with plain `tar`, so this works the same on
+# macOS (bsdtar) and Linux (GNU tar). GNU-only `--transform` is avoided;
+# the tarball's top-level dir comes from `--prefix`.
+rm -rf "${WORK_DIR}/${SRC_STAGE_NAME}"
+git -C "${CLONE_DIR}" archive --format=tar --prefix="${SRC_STAGE_NAME}/" 
"${TAG}" \
+    | tar -C "${WORK_DIR}" -xf -
+# Drop the CI publish workflow from the source release (ASF-infra specific).
+rm -f "${WORK_DIR}/${SRC_STAGE_NAME}/.github/workflows/publish-image.yaml"
+tar -C "${WORK_DIR}" -czf "${SRC_TAR}" "${SRC_STAGE_NAME}"
 
 echo "Source tarball: ${SRC_TAR}"
 

Reply via email to