You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2025/05/23 03:25:17 UTC
(spark) branch branch-3.5 updated: [SPARK-52276][BUILD] Make ANSWER not to be overwritten in release scripts
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 5f3d97e9e057 [SPARK-52276][BUILD] Make ANSWER not to be overwritten in release scripts
5f3d97e9e057 is described below
commit 5f3d97e9e0579a2e28dff1bb4986c636adcc0004
Author: Hyukjin Kwon <gu...@apache.org>
AuthorDate: Fri May 23 12:24:47 2025 +0900
[SPARK-52276][BUILD] Make ANSWER not to be overwritten in release scripts
### What changes were proposed in this pull request?
This PR is rather a followup of https://github.com/apache/spark/commit/d7d8b243c7d7c787b335ec83e9de4112a6b3294c . This PR makes ANSWER not to be overwritten in release scripts.
### Why are the changes needed?
ANSWER should not be overwritten.
### Does this PR introduce _any_ user-facing change?
No, dev-only.
### How was this patch tested?
Manually ran the script.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #50995 from HyukjinKwon/SPARK-52225-followup3.
Authored-by: Hyukjin Kwon <gu...@apache.org>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
(cherry picked from commit b8e6dc24bad71a2f251d652eb81ffedc00bc1d40)
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
dev/create-release/do-release-docker.sh | 18 +++++++++++-------
dev/create-release/release-util.sh | 19 +++++++++++--------
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/dev/create-release/do-release-docker.sh b/dev/create-release/do-release-docker.sh
index d3292d1dcb19..16aa857a3e8a 100755
--- a/dev/create-release/do-release-docker.sh
+++ b/dev/create-release/do-release-docker.sh
@@ -72,9 +72,11 @@ fi
if [ -d "$WORKDIR/output" ]; then
if [ -z "$ANSWER" ]; then
- read -p "Output directory already exists. Overwrite and continue? [y/n] " ANSWER
- fi
- if [ "$ANSWER" != "y" ]; then
+ read -p "Output directory already exists. Overwrite and continue? [y/n] " userinput
+ if [ "$userinput" != "y" ]; then
+ error "Exiting."
+ fi
+ elif [ "$ANSWER" != "y" ]; then
error "Exiting."
fi
fi
@@ -82,9 +84,11 @@ fi
if [ ! -z "$RELEASE_STEP" ] && [ "$RELEASE_STEP" = "finalize" ]; then
echo "THIS STEP IS IRREVERSIBLE! Make sure the vote has passed and you pick the right RC to finalize."
if [ -z "$ANSWER" ]; then
- read -p "You must be a PMC member to run this step. Continue? [y/n] " ANSWER
- fi
- if [ "$ANSWER" != "y" ]; then
+ read -p "You must be a PMC member to run this step. Continue? [y/n] " userinput
+ if [ "$userinput" != "y" ]; then
+ error "Exiting."
+ fi
+ elif [ "$ANSWER" != "y" ]; then
error "Exiting."
fi
@@ -163,7 +167,7 @@ if [ -n "$JAVA" ]; then
fi
echo "Building $RELEASE_TAG; output will be at $WORKDIR/output"
-docker $([ -z "$GITHUB_ACTIONS" ] && echo "-ti") run \
+docker run $([ -z "$GITHUB_ACTIONS" ] && echo "-ti") \
--env-file "$ENVFILE" \
--volume "$WORKDIR:/opt/spark-rm" \
$JAVA_VOL \
diff --git a/dev/create-release/release-util.sh b/dev/create-release/release-util.sh
index 531e353fe951..687ccab7e1ca 100755
--- a/dev/create-release/release-util.sh
+++ b/dev/create-release/release-util.sh
@@ -147,9 +147,11 @@ function get_release_info {
SKIP_TAG="${SKIP_TAG:-0}"
if check_for_tag "$RELEASE_TAG" && [[ $SKIP_TAG = 0 ]]; then
if [ -z "$ANSWER" ]; then
- read -p "$RELEASE_TAG already exists. Continue anyway [y/n]? " ANSWER
- fi
- if [ "$ANSWER" != "y" ]; then
+ read -p "$RELEASE_TAG already exists. Continue anyway [y/n]? " userinput
+ if [ "$userinput" != "y" ]; then
+ error "Exiting."
+ fi
+ elif [ "$ANSWER" != "y" ]; then
error "Exiting."
fi
SKIP_TAG=1
@@ -198,11 +200,12 @@ E-MAIL: $GIT_EMAIL
EOF
if [ -z "$ANSWER" ]; then
- read -p "Is this info correct [y/n]? " ANSWER
- fi
- if [ "$ANSWER" != "y" ]; then
- echo "Exiting."
- exit 1
+ read -p "Is this info correct [y/n]? " userinput
+ if [ "$userinput" != "y" ]; then
+ error "Exiting."
+ fi
+ elif [ "$ANSWER" != "y" ]; then
+ error "Exiting."
fi
if ! is_dry_run; then
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org