nsivabalan commented on code in PR #5240:
URL: https://github.com/apache/hudi/pull/5240#discussion_r844027463


##########
scripts/release/deploy_staging_jars.sh:
##########
@@ -21,40 +21,28 @@
 ## Variables with defaults (if not overwritten by environment)
 ##
 MVN=${MVN:-mvn}
-SPARK_VERSION=2
 # fail immediately
 set -o errexit
 set -o nounset
 # print command before executing
 set -o xtrace
 
-CURR_DIR=`pwd`
-if [[ `basename $CURR_DIR` != "scripts" ]] ; then
-  echo "You have to call the script from the scripts/ dir"
+CURR_DIR=$(pwd)
+if [ ! -d "$CURR_DIR/packaging" ] ; then
+  echo "You have to call the script from the repository root dir that contains 
'packaging/'"
   exit 1
 fi
 
-if [[ $# -lt 1 ]]; then
-    echo "This script will deploy artifacts to staging repositories"
-    echo "There is one param required:"
-    echo "--scala_version=\${SCALA_VERSION}"
-    exit
-else
-    for param in "$@"
-    do
-       if [[ $param =~ --scala_version\=(2\.1[1-2]) ]]; then
-               SCALA_VERSION=${BASH_REMATCH[1]}
-      elif [[ $param =~ --spark_version\=([2-3]) ]]; then
-              SPARK_VERSION=${BASH_REMATCH[1]}
-       fi
-    done
-fi
-
-###########################
-
-cd ..
-
-echo "Deploying to repository.apache.org with scala version ${SCALA_VERSION}"
-
-COMMON_OPTIONS="-Dscala-${SCALA_VERSION} -Dspark${SPARK_VERSION} -Prelease 
-DskipTests -DretryFailedDeploymentCount=10 -DdeployArtifacts=true"
-$MVN clean deploy $COMMON_OPTIONS
+declare -a SUPPORTED_VERSION_OPTS=(
+"-Dscala-2.11 -Dspark2.4 -Dflink1.13"
+"-Dscala-2.12 -Dspark2.4 -Dflink1.13"
+"-Dscala-2.12 -Dspark3.1 -Dflink1.14"
+"-Dscala-2.12 -Dspark3.2 -Dflink1.14"
+)
+
+for v in "${SUPPORTED_VERSION_OPTS[@]}"
+do

Review Comment:
   if for some reason, network issue or service unavailable, and if RM needs to 
retry, we can't go w/ for loop here. Can you de-couple that. or add an option 
to do everything. or give an option for user to specify on set of option. 



-- 
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]

Reply via email to