github-actions[bot] commented on code in PR #65488: URL: https://github.com/apache/doris/pull/65488#discussion_r3565776418
########## tools/release-tools/04-release-complete.sh: ########## @@ -0,0 +1,205 @@ +#!/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. + +# Step 04 - publish the passed RC source artifact to the Apache release SVN +# and generate the [ANNOUNCE] email draft. +# +# The release SVN commit is public and requires PMC permission. This script +# pauses for confirmation before changing SVN, and it never sends email. +set -euo pipefail +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=release.env +source "${HERE}/release.env" + +ok() { echo "[ OK ] $*"; } +warn() { echo "[WARN] $*"; } +die() { echo "[FAIL] $*" >&2; exit 1; } +confirm() { local a; read -r -p "$1 [y/N] " a; [[ "$a" == y || "$a" == Y ]]; } + +mail_only=0 +usage() { + cat <<EOF +Usage: $0 [--mail-only] + +Publishes Apache Doris ${TAG} source artifacts from dev SVN to release SVN as +Apache Doris ${VERSION}, then writes the [ANNOUNCE] email draft. + +Options: + --mail-only Only write announce-email.txt and announce-email.eml. +EOF +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --mail-only) mail_only=1; shift ;; + -h|--help) usage; exit 0 ;; + *) die "unknown argument: $1" ;; + esac +done + +svn_auth=(--non-interactive --no-auth-cache) +[[ -n "${ASF_USERNAME:-}" ]] && svn_auth+=(--username "$ASF_USERNAME") +[[ -n "${ASF_PASSWORD:-}" ]] && svn_auth+=(--password "$ASF_PASSWORD") +svnmucc_auth=(--non-interactive --no-auth-cache) +[[ -n "${ASF_USERNAME:-}" ]] && svnmucc_auth+=(-u "$ASF_USERNAME") +[[ -n "${ASF_PASSWORD:-}" ]] && svnmucc_auth+=(-p "$ASF_PASSWORD") + +RELEASE_PKG_BASE="${RELEASE_PKG_BASE:-apache-doris-${VERSION}-src}" +RELEASE_SVN_DIR="${RELEASE_SVN_DIR:-${RELEASE_SVN_BASE}/${VERSION}}" Review Comment: This fallback does not match the release SVN layout that the new `release.env` and README document. If `RELEASE_SVN_DIR` is unset or empty in a custom/older env, step 04 falls back to `${RELEASE_SVN_BASE}/${VERSION}`; for `4.0.7` that publishes under `release/doris/4.0.7` instead of the intended `release/doris/4.0/4.0.7`. Please derive `RELEASE_SERIES="${RELEASE_SERIES:-${VERSION%.*}}"` here and use `${RELEASE_SVN_BASE}/${RELEASE_SERIES}/${VERSION}` for the fallback, or fail when `RELEASE_SVN_DIR` is missing so the script cannot silently target the wrong release directory. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
