Repository: spark Updated Branches: refs/heads/master fb0543224 -> e97a2e671
SPARK-1658: Correctly identify if maven is installed and working The current test is checking the exit code of "tail" rather than "mvn". This new check will make sure that mvn is installed and was able to execute the "version command". Author: Rahul Singhal <[email protected]> Closes #580 from rahulsinghaliitd/SPARK-1658 and squashes the following commits: 83c0313 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working bf821b9 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e97a2e67 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e97a2e67 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e97a2e67 Branch: refs/heads/master Commit: e97a2e6717e75c70c5474f2d211682565909e557 Parents: fb05432 Author: Rahul Singhal <[email protected]> Authored: Sun May 4 11:08:39 2014 -0700 Committer: Patrick Wendell <[email protected]> Committed: Sun May 4 11:08:39 2014 -0700 ---------------------------------------------------------------------- make-distribution.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/e97a2e67/make-distribution.sh ---------------------------------------------------------------------- diff --git a/make-distribution.sh b/make-distribution.sh index c05dcd8..dc8aa56 100755 --- a/make-distribution.sh +++ b/make-distribution.sh @@ -43,8 +43,9 @@ FWDIR="$(cd `dirname $0`; pwd)" DISTDIR="$FWDIR/dist" -VERSION=$(mvn help:evaluate -Dexpression=project.version | grep -v "INFO" | tail -n 1) -if [ $? == -1 ] ;then +set -o pipefail +VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1) +if [ $? != 0 ]; then echo -e "You need Maven installed to build Spark." echo -e "Download Maven from https://maven.apache.org." exit -1;
