This is an automated email from the ASF dual-hosted git repository.
djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-backup.git
The following commit(s) were added to refs/heads/main by this push:
new fe20fd09 Fix release tarball base version naming
fe20fd09 is described below
commit fe20fd0982868983edff9f717ccc2f9bfb652657
Author: Dianjin Wang <[email protected]>
AuthorDate: Wed Apr 1 12:09:21 2026 +0800
Fix release tarball base version naming
For RC tags like X.Y.Z-incubating-rcN, generate the source tarball
filename and top-level directory using VERSION_FILE (without -rcN).
$VERSION_FILE is input from the file VERSION.
This keeps the voted bits ready for promotion without rebuilding and
avoids -rcN showing up in the extracted source directory.
---
cloudberry-backup-release.sh | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/cloudberry-backup-release.sh b/cloudberry-backup-release.sh
index 090c41cb..a15697db 100755
--- a/cloudberry-backup-release.sh
+++ b/cloudberry-backup-release.sh
@@ -518,16 +518,16 @@ section "Staging release: $TAG"
export COPYFILE_DISABLE=1
export COPY_EXTENDED_ATTRIBUTES_DISABLE=1
- git archive --format=tar --prefix="apache-cloudberry-backup-${TAG}/" "$TAG"
| tar -x -C "$TMP_DIR"
+ git archive --format=tar
--prefix="apache-cloudberry-backup-${VERSION_FILE}-incubating/" "$TAG" | tar -x
-C "$TMP_DIR"
# Archive submodules if any
if [ -s .gitmodules ]; then
git submodule foreach --recursive --quiet "
echo \"Archiving submodule: \$sm_path\"
fullpath=\"\$toplevel/\$sm_path\"
- destpath=\"$TMP_DIR/apache-cloudberry-backup-${TAG}/\$sm_path\"
+
destpath=\"$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating/\$sm_path\"
mkdir -p \"\$destpath\"
- git -C \"\$fullpath\" archive --format=tar --prefix=\"\$sm_path/\" HEAD
| tar -x -C \"$TMP_DIR/apache-cloudberry-backup-${TAG}\"
+ git -C \"\$fullpath\" archive --format=tar --prefix=\"\$sm_path/\" HEAD
| tar -x -C \"$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating\"
"
fi
@@ -536,25 +536,25 @@ section "Staging release: $TAG"
echo "Cleaning macOS extended attributes from extracted files..."
# Remove all extended attributes recursively
if command -v xattr >/dev/null 2>&1; then
- find "$TMP_DIR/apache-cloudberry-backup-${TAG}" -type f -exec xattr -c
{} \; 2>/dev/null || true
+ find "$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating"
-type f -exec xattr -c {} \; 2>/dev/null || true
echo "[OK] Extended attributes cleaned using xattr"
fi
# Remove any ._* files that might have been created
- find "$TMP_DIR/apache-cloudberry-backup-${TAG}" -name '._*' -delete
2>/dev/null || true
- find "$TMP_DIR/apache-cloudberry-backup-${TAG}" -name '.DS_Store' -delete
2>/dev/null || true
- find "$TMP_DIR/apache-cloudberry-backup-${TAG}" -name '__MACOSX' -type d
-exec rm -rf {} \; 2>/dev/null || true
+ find "$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating" -name
'._*' -delete 2>/dev/null || true
+ find "$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating" -name
'.DS_Store' -delete 2>/dev/null || true
+ find "$TMP_DIR/apache-cloudberry-backup-${VERSION_FILE}-incubating" -name
'__MACOSX' -type d -exec rm -rf {} \; 2>/dev/null || true
echo "[OK] macOS-specific files removed"
fi
# Create tarball using the detected tar tool
if [[ "$DETECTED_PLATFORM" == "macOS" ]]; then
echo "Using GNU tar for cross-platform compatibility..."
- $DETECTED_TAR_TOOL --exclude='._*' --exclude='.DS_Store'
--exclude='__MACOSX' -czf "$TAR_NAME" -C "$TMP_DIR"
"apache-cloudberry-backup-${TAG}"
+ $DETECTED_TAR_TOOL --exclude='._*' --exclude='.DS_Store'
--exclude='__MACOSX' -czf "$TAR_NAME" -C "$TMP_DIR"
"apache-cloudberry-backup-${VERSION_FILE}-incubating"
echo "INFO: macOS detected - applied extended attribute cleanup and GNU
tar"
else
# On other platforms, use standard tar
- $DETECTED_TAR_TOOL -czf "$TAR_NAME" -C "$TMP_DIR"
"apache-cloudberry-backup-${TAG}"
+ $DETECTED_TAR_TOOL -czf "$TAR_NAME" -C "$TMP_DIR"
"apache-cloudberry-backup-${VERSION_FILE}-incubating"
fi
rm -rf "$TMP_DIR"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]