Repository: spark Updated Branches: refs/heads/branch-1.0 acbf307c2 -> 2ee5f0447
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 <rahul.sing...@guavus.com> 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 (cherry picked from commit e97a2e6717e75c70c5474f2d211682565909e557) Signed-off-by: Patrick Wendell <pwend...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2ee5f044 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2ee5f044 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2ee5f044 Branch: refs/heads/branch-1.0 Commit: 2ee5f04479b85b7160d784684b1ab6f0a2c81e63 Parents: acbf307 Author: Rahul Singhal <rahul.sing...@guavus.com> Authored: Sun May 4 11:08:39 2014 -0700 Committer: Patrick Wendell <pwend...@gmail.com> Committed: Sun May 4 11:08:52 2014 -0700 ---------------------------------------------------------------------- make-distribution.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/2ee5f044/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;