wgtmac commented on code in PR #193: URL: https://github.com/apache/iceberg-cpp/pull/193#discussion_r2303314627
########## dev/release/rat_exclude_files.txt: ########## @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +.gitignore +LICENSE +NOTICE +CONTRIBUTING.md +CHANGELOG.md +build/** +dist/** +.git/** +cmake_modules/** +.cmake/** Review Comment: ```suggestion ``` ########## dev/release/README.md: ########## @@ -0,0 +1,105 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> + +# Release + +## Overview + + 1. Test the revision to be released + 2. Prepare RC and vote (detailed later) + 3. Publish (detailed later) + +### Prepare RC and vote + +Run `dev/release/release_rc.sh` on a working copy of +`g...@github.com:apache/iceberg-cpp` not from your fork: + +```console +$ git clone g...@github.com:apache/iceberg-cpp.git +$ dev/release/release_rc.sh ${VERSION} ${RC} +(Send a vote email to d...@iceberg.apache.org. + You can use a draft shown by release_rc.sh for the email.) +``` + +Here is an example to release RC1: + +```console +$ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release_rc.sh 0.1.0 1 +``` + +The arguments of `release_rc.sh` are the version and the RC number. If RC1 has a problem, we'll increment the RC number such as RC2, RC3 and so on. Review Comment: ```suggestion The arguments of `release_rc.sh` are the version and the RC number. If RC0 has a problem, we'll increment the RC number such as RC1, RC2 and so on. ``` ########## dev/release/README.md: ########## @@ -0,0 +1,105 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> + +# Release + +## Overview + + 1. Test the revision to be released + 2. Prepare RC and vote (detailed later) + 3. Publish (detailed later) + +### Prepare RC and vote + +Run `dev/release/release_rc.sh` on a working copy of +`g...@github.com:apache/iceberg-cpp` not from your fork: + +```console +$ git clone g...@github.com:apache/iceberg-cpp.git +$ dev/release/release_rc.sh ${VERSION} ${RC} +(Send a vote email to d...@iceberg.apache.org. + You can use a draft shown by release_rc.sh for the email.) +``` + +Here is an example to release RC1: + +```console +$ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release_rc.sh 0.1.0 1 +``` + +The arguments of `release_rc.sh` are the version and the RC number. If RC1 has a problem, we'll increment the RC number such as RC2, RC3 and so on. + +Requirements to run `release_rc.sh`: + + * You must be an Apache Iceberg committer or PMC member + * You must prepare your PGP key for signing + +If you don't have a PGP key, https://infra.apache.org/release-signing.html#generate +may be helpful. + +Your PGP key must be registered to the following: + + * https://downloads.apache.org/iceberg/KEYS + +See the header comment of them for how to add a PGP key. + +Apache Iceberg committers can update them by Subversion client with their ASF account. +e.g.: + +```console +$ svn co https://dist.apache.org/repos/dist/release/iceberg +$ cd iceberg +$ editor KEYS +$ svn ci KEYS +``` + +### Publish + +We need to do the following to publish a new release: + + * Publish to apache.org Review Comment: ```suggestion We need to publish to apache.org for the new release: ``` ########## dev/release/README.md: ########## @@ -0,0 +1,105 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> + +# Release + +## Overview + + 1. Test the revision to be released + 2. Prepare RC and vote (detailed later) + 3. Publish (detailed later) + +### Prepare RC and vote + +Run `dev/release/release_rc.sh` on a working copy of +`g...@github.com:apache/iceberg-cpp` not from your fork: + +```console +$ git clone g...@github.com:apache/iceberg-cpp.git +$ dev/release/release_rc.sh ${VERSION} ${RC} +(Send a vote email to d...@iceberg.apache.org. + You can use a draft shown by release_rc.sh for the email.) +``` + +Here is an example to release RC1: Review Comment: ```suggestion Here is an example to release RC0 of version 0.1.0: ``` ########## dev/release/verify_rc.sh: ########## @@ -0,0 +1,194 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -eu + +for cmd in curl gpg cmake; do + if ! command -v ${cmd} &> /dev/null; then + echo "This script requires '${cmd}' but it's not installed. Aborting." + exit 1 + fi +done + +SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TOP_SOURCE_DIR="$(dirname "$(dirname "${SOURCE_DIR}")")" + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 <version> <rc>" + echo " e.g.: $0 0.1.0 1" + exit 1 +fi + +set -o pipefail +set -x + +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}" + +: "${VERIFY_DEFAULT:=1}" +: "${VERIFY_DOWNLOAD:=${VERIFY_DEFAULT}}" +: "${VERIFY_SIGN:=${VERIFY_DEFAULT}}" + +VERIFY_SUCCESS=no + +setup_tmpdir() { + cleanup() { + if [ "${VERIFY_SUCCESS}" = "yes" ]; then + rm -rf "${VERIFY_TMPDIR}" + else + echo "Failed to verify release candidate. See ${VERIFY_TMPDIR} for details." + fi + } + + if [ -z "${VERIFY_TMPDIR:-}" ]; then + VERIFY_TMPDIR="$(mktemp -d -t "$1.XXXXX")" + trap cleanup EXIT + else + mkdir -p "${VERIFY_TMPDIR}" + fi +} + +download() { + curl \ + --fail \ + --location \ + --remote-name \ + --show-error \ + --silent \ + "$1" +} + +download_rc_file() { + if [ "${VERIFY_DOWNLOAD}" -gt 0 ]; then + download "${DOWNLOAD_RC_BASE_URL}/$1" + else + cp "${TOP_SOURCE_DIR}/$1" "$1" + fi +} + +import_gpg_keys() { + if [ "${VERIFY_SIGN}" -gt 0 ]; then + download "${ICEBERG_DIST_BASE_URL}/KEYS" + gpg --import KEYS + fi +} + +if type shasum >/dev/null 2>&1; then + sha512_verify="shasum -a 512 -c" +else + sha512_verify="sha512sum -c" +fi + +fetch_archive() { + download_rc_file "${ARCHIVE_BASE_NAME}.tar.gz" + if [ "${VERIFY_SIGN}" -gt 0 ]; then + download_rc_file "${ARCHIVE_BASE_NAME}.tar.gz.asc" + gpg --verify "${ARCHIVE_BASE_NAME}.tar.gz.asc" "${ARCHIVE_BASE_NAME}.tar.gz" + fi + download_rc_file "${ARCHIVE_BASE_NAME}.tar.gz.sha512" + ${sha512_verify} "${ARCHIVE_BASE_NAME}.tar.gz.sha512" +} + +ensure_source_directory() { + tar xf "${ARCHIVE_BASE_NAME}".tar.gz +} + +check_compiler() { Review Comment: We don't need this. CMake script already enforce this. ########## dev/release/README.md: ########## @@ -0,0 +1,105 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--> + +# Release + +## Overview + + 1. Test the revision to be released + 2. Prepare RC and vote (detailed later) + 3. Publish (detailed later) + +### Prepare RC and vote + +Run `dev/release/release_rc.sh` on a working copy of +`g...@github.com:apache/iceberg-cpp` not from your fork: + +```console +$ git clone g...@github.com:apache/iceberg-cpp.git +$ dev/release/release_rc.sh ${VERSION} ${RC} +(Send a vote email to d...@iceberg.apache.org. + You can use a draft shown by release_rc.sh for the email.) +``` + +Here is an example to release RC1: + +```console +$ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release_rc.sh 0.1.0 1 Review Comment: ```suggestion $ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release_rc.sh 0.1.0 0 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org