Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/704'
Browse files Browse the repository at this point in the history
Conflicts:
	make-distribution.sh
  • Loading branch information
mateiz committed Jul 17, 2013
2 parents 4ff494d + 90b0142 commit 7e74ab5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ dependency-reduced-pom.xml
.ensime_lucene
checkpoint
derby.log
dist/
spark-*-bin.tar.gz
24 changes: 21 additions & 3 deletions make-distribution.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

#
# Licensed to the Apache Software Foundation (ASF) under one or more
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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

0 comments on commit 7e74ab5

Please sign in to comment.