tweise closed pull request #7278: [FLINK-11145] Allow for override of 
HADOOP_VERSION for single variant binary release build
URL: https://github.com/apache/flink/pull/7278
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/releasing/create_binary_release.sh 
b/tools/releasing/create_binary_release.sh
index f4d7c5770ca..444e01b28ce 100755
--- a/tools/releasing/create_binary_release.sh
+++ b/tools/releasing/create_binary_release.sh
@@ -20,8 +20,8 @@
 ##
 ## Variables with defaults (if not overwritten by environment)
 ##
-SCALA_VERSION=none
-HADOOP_VERSION=none
+SCALA_VERSION=${SCALA_VERSION:-none}
+HADOOP_VERSION=${HADOOP_VERSION:-none}
 SKIP_GPG=${SKIP_GPG:-false}
 MVN=${MVN:-mvn}
 
@@ -95,27 +95,27 @@ make_binary_release() {
   cd ${FLINK_DIR}
 }
 
+HADOOP_CLASSIFIERS=("24" "26" "27" "28")
+HADOOP_VERSIONS=("2.4.1" "2.6.5" "2.7.5" "2.8.3")
+
 if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then
   make_binary_release "" "-DwithoutHadoop" "2.12"
-  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.12"
-  make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.12"
-  make_binary_release "hadoop27" "-Dhadoop.version=2.7.5" "2.12"
-  make_binary_release "hadoop28" "-Dhadoop.version=2.8.3" "2.12"
+  for i in "${!HADOOP_CLASSIFIERS[@]}"; do
+    make_binary_release "hadoop${HADOOP_CLASSIFIERS[$i]}" 
"-Dhadoop.version=${HADOOP_VERSIONS[$i]}" "2.12"
+  done
   make_binary_release "" "-DwithoutHadoop" "2.11"
-  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.11"
-  make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "2.11"
-  make_binary_release "hadoop27" "-Dhadoop.version=2.7.5" "2.11"
-  make_binary_release "hadoop28" "-Dhadoop.version=2.8.3" "2.11"
+  for i in "${!HADOOP_CLASSIFIERS[@]}"; do
+    make_binary_release "hadoop${HADOOP_CLASSIFIERS[$i]}" 
"-Dhadoop.version=${HADOOP_VERSIONS[$i]}" "2.11"
+  done
 elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ]
 then
   make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11"
 elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ]
 then
   make_binary_release "" "-DwithoutHadoop" "$SCALA_VERSION"
-  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "$SCALA_VERSION"
-  make_binary_release "hadoop26" "-Dhadoop.version=2.6.5" "$SCALA_VERSION"
-  make_binary_release "hadoop27" "-Dhadoop.version=2.7.3" "$SCALA_VERSION"
-  make_binary_release "hadoop28" "-Dhadoop.version=2.8.0" "$SCALA_VERSION"
+  for i in "${!HADOOP_CLASSIFIERS[@]}"; do
+    make_binary_release "hadoop${HADOOP_CLASSIFIERS[$i]}" 
"-Dhadoop.version=${HADOOP_VERSIONS[$i]}" "$SCALA_VERSION"
+  done
 else
   make_binary_release "hadoop2x" "-Dhadoop.version=$HADOOP_VERSION" 
"$SCALA_VERSION"
 fi


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to