Skip to content
Snippets Groups Projects
Commit b8f2e13a authored by Guillaume Ballet's avatar Guillaume Ballet Committed by Patrick Wendell
Browse files

[SPARK-2233] make-distribution script should list the git hash in the RELEASE file

This patch adds the git revision hash (short version) to the RELEASE file. It uses git instead of simply checking for the existence of .git, so as to make sure that this is a functional repository.

Author: Guillaume Ballet <gballet@gmail.com>

Closes #1216 from gballet/master and squashes the following commits:

eabc50f [Guillaume Ballet] Refactored the script to take comments into account.
d93e5e8 [Guillaume Ballet] [SPARK 2233] make-distribution script now lists the git hash tag in the RELEASE file.
parent 0e0686d3
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,14 @@ if [ -z "$JAVA_HOME" ]; then
exit -1
fi
if which git &>/dev/null; then
GITREV=$(git rev-parse --short HEAD 2>/dev/null || :)
if [ ! -z $GITREV ]; then
GITREVSTRING=" (git revision $GITREV)"
fi
unset GITREV
fi
if ! which mvn &>/dev/null; then
echo -e "You need Maven installed to build Spark."
echo -e "Download Maven from https://maven.apache.org/"
......@@ -186,7 +194,7 @@ ${BUILD_COMMAND}
# Make directories
rm -rf "$DISTDIR"
mkdir -p "$DISTDIR/lib"
echo "Spark $VERSION built for Hadoop $SPARK_HADOOP_VERSION" > "$DISTDIR/RELEASE"
echo "Spark $VERSION$GITREVSTRING built for Hadoop $SPARK_HADOOP_VERSION" > "$DISTDIR/RELEASE"
# Copy jars
cp $FWDIR/assembly/target/scala*/*assembly*hadoop*.jar "$DISTDIR/lib/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment