Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22333#discussion_r215124159
--- Diff: build/mvn ---
@@ -91,15 +92,23 @@ install_mvn() {
# Install zinc under the build/ folder
install_zinc() {
- local zinc_path="zinc-0.3.15/bin/zinc"
- [ ! -f "${_DIR}/${zinc_path}" ] && ZINC_INSTALL_FLAG=1
- local TYPESAFE_MIRROR=${TYPESAFE_MIRROR:-https://downloads.lightbend.com}
+ ZINC_VERSION=0.3.15
+ ZINC_BIN="$(command -v zinc)"
+ if [ "$ZINC_BIN" ]; then
+ local ZINC_DETECTED_VERSION="$(zinc -version | head -n1 | awk '{print
$5}')"
+ fi
- install_app \
- "${TYPESAFE_MIRROR}/zinc/0.3.15" \
- "zinc-0.3.15.tgz" \
- "${zinc_path}"
- ZINC_BIN="${_DIR}/${zinc_path}"
+ if [ $(version $ZINC_DETECTED_VERSION) -lt $(version $ZINC_VERSION) ];
then
--- End diff --
Thank you for review, @srowen . Yes. We use the same logic for Maven.
If no zinc was detected, it is evaluated as `000000000 -lt 000003015`, and
eventually `false`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]