diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-16 19:13:07 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-07-16 19:13:07 -0700 |
commit | 7e74ab5b0f4e15a3bb8c05792e5c7c0970775587 (patch) | |
tree | c107e50313b2fec99e8b2d46caa1b1d80602c5f5 /make-distribution.sh | |
parent | 4ff494de20c36151dc29a60825d67e094d14acd4 (diff) | |
parent | 90b0142985ca2c6c76ded1a5c073774308c1a727 (diff) | |
download | spark-7e74ab5b0f4e15a3bb8c05792e5c7c0970775587.tar.gz spark-7e74ab5b0f4e15a3bb8c05792e5c7c0970775587.tar.bz2 spark-7e74ab5b0f4e15a3bb8c05792e5c7c0970775587.zip |
Merge remote-tracking branch 'origin/pr/704'
Conflicts:
make-distribution.sh
Diffstat (limited to 'make-distribution.sh')
-rwxr-xr-x | make-distribution.sh | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/make-distribution.sh b/make-distribution.sh index 0116215163..4374e0e8c4 100755 --- a/make-distribution.sh +++ b/make-distribution.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one or more @@ -24,6 +24,10 @@ # so it is completely self contained. # It does not contain source or *.class files. # +# Arguments +# (none): Creates dist/ directory +# tgz: Additionally creates spark-$VERSION-bin.tar.gz +# # Recommended deploy/testing procedure (standalone mode): # 1) Rsync / deploy the dist/ dir to one host # 2) cd to deploy dir; ./bin/start-master.sh @@ -38,8 +42,14 @@ DISTDIR="$FWDIR/dist" # Get version from SBT export TERM=dumb # Prevents color codes in SBT output -VERSION=$($FWDIR/sbt/sbt "show version" | tail -1 | cut -f 2) -echo "Making distribution for Spark $VERSION in $DISTDIR..." +VERSION=$($FWDIR/sbt/sbt "show version" | tail -1 | cut -f 2 | sed 's/^\([a-zA-Z0-9.-]*\).*/\1/') + +if [ "$1" == "tgz" ]; then + echo "Making spark-$VERSION-bin.tar.gz" +else + echo "Making distribution for Spark $VERSION in $DISTDIR..." +fi + # Build fat JAR $FWDIR/sbt/sbt "repl/assembly" @@ -56,3 +66,11 @@ cp $FWDIR/repl/target/*.jar "$DISTDIR/jars/" cp -r "$FWDIR/bin" "$DISTDIR" cp -r "$FWDIR/conf" "$DISTDIR" cp "$FWDIR/run" "$FWDIR/spark-shell" "$DISTDIR" + + +if [ "$1" == "tgz" ]; then + TARDIR="$FWDIR/spark-$VERSION" + cp -r $DISTDIR $TARDIR + tar -zcf spark-$VERSION-bin.tar.gz -C $FWDIR spark-$VERSION + rm -rf $TARDIR +fi |