From 48d185470c9ad3593f156d742dac4ca1fb5216f0 Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Wed, 10 Sep 2025 16:58:58 +0800 Subject: [PATCH] fix: fix release tarball name --- .github/workflows/rc.yml | 2 +- dev/release/release_rc.sh | 17 ++++++----------- dev/release/verify_rc.sh | 7 ++++--- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index ee0247e00..f6655853e 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -49,7 +49,7 @@ jobs: - name: Archive run: | - ARCHIVE_FILE_NAME="apache-iceberg-cpp-${VERSION}-rc${RC}" + ARCHIVE_FILE_NAME="apache-iceberg-cpp-${VERSION}" tar_gz="${ARCHIVE_FILE_NAME}.tar.gz" echo "TAR_GZ=${tar_gz}" >> ${GITHUB_ENV} git archive HEAD --prefix "${ARCHIVE_FILE_NAME}/" --output "${tar_gz}" diff --git a/dev/release/release_rc.sh b/dev/release/release_rc.sh index 7ef1268d4..6dce63b93 100755 --- a/dev/release/release_rc.sh +++ b/dev/release/release_rc.sh @@ -71,7 +71,8 @@ fi rc_hash="$(git rev-list --max-count=1 "${rc_tag}")" -id="apache-iceberg-cpp-${version}-rc${rc}" +id="apache-iceberg-cpp-${version}" +rc_id="${id}-${rc}" tar_gz="${id}.tar.gz" if [ "${RELEASE_SIGN}" -gt 0 ]; then @@ -94,18 +95,18 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then echo "Found GitHub Actions workflow with ID: ${run_id}" gh run watch --repo "${repository}" --exit-status "${run_id}" - mkdir -p "${id}" + mkdir -p "${rc_id}" echo "Downloading .tar.gz and .sha512 from GitHub Releases" gh release download "${rc_tag}" \ - --dir "${id}" \ + --dir "${rc_id}" \ --pattern "${tar_gz}" \ --pattern "${tar_gz}.sha512" \ --repo "${repository}" \ --skip-existing echo "Signing tar.gz" - cd "${id}" + cd "${rc_id}" gpg --armor --output "${tar_gz}.asc" --detach-sig "${tar_gz}" echo "Add signature to GitHub release" gh release upload "${rc_tag}" \ @@ -117,13 +118,7 @@ fi if [ "${RELEASE_UPLOAD}" -gt 0 ]; then echo "Uploading to ASF dist/dev..." - # rename files to remove -rc${rc} suffix before uploading - pushd "${id}" - for fname in ./*; do - mv "${fname}" "${fname//-rc${rc}/}" - done - popd - svn import "${id}" "https://dist.apache.org/repos/dist/dev/iceberg/${id}" -m "Apache Iceberg C++ ${version} RC${rc}" + svn import "${rc_id}" "https://dist.apache.org/repos/dist/dev/iceberg/${rc_id}" -m "Apache Iceberg C++ ${version} RC${rc}" fi echo "Draft email for dev@iceberg.apache.org mailing list" diff --git a/dev/release/verify_rc.sh b/dev/release/verify_rc.sh index f32626d19..842378470 100755 --- a/dev/release/verify_rc.sh +++ b/dev/release/verify_rc.sh @@ -42,8 +42,9 @@ VERSION="$1" RC="$2" ICEBERG_DIST_BASE_URL="https://downloads.apache.org/iceberg" -DOWNLOAD_RC_BASE_URL="https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-cpp-${VERSION}-rc${RC}" -ARCHIVE_BASE_NAME="apache-iceberg-cpp-${VERSION}-rc${RC}" +RC_BASE_DIR="apache-iceberg-cpp-${VERSION}-rc${RC}" +DOWNLOAD_RC_BASE_URL="https://dist.apache.org/repos/dist/dev/iceberg/${RC_BASE_DIR}" +ARCHIVE_BASE_NAME="apache-iceberg-cpp-${VERSION}" : "${VERIFY_DEFAULT:=1}" : "${VERIFY_DOWNLOAD:=${VERIFY_DEFAULT}}" @@ -142,7 +143,7 @@ cd "${VERIFY_TMPDIR}" import_gpg_keys fetch_archive ensure_source_directory -pushd "${ARCHIVE_BASE_NAME}" +pushd "${RC_BASE_DIR}" test_source_distribution popd