From b8bb762e38ef159f0d11311760202d33933811e5 Mon Sep 17 00:00:00 2001 From: Robert Metzger Date: Thu, 2 Apr 2015 10:13:13 +0200 Subject: [PATCH] [release scripts] Update scripts for 0.9.0-milestone1 --- tools/create_release_files.sh | 17 ++++++++++++++--- tools/travis_mvn_watchdog.sh | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/create_release_files.sh b/tools/create_release_files.sh index c9b1aaa60d17e..367ba05bf0a1e 100755 --- a/tools/create_release_files.sh +++ b/tools/create_release_files.sh @@ -29,9 +29,6 @@ # https://github.com/apache/spark/blob/master/dev/create-release/create-release.sh # -# Added by rmetzger -echo "Please make sure to use java 6 OPENJDK (not oracle) to build the release binaries" -exit 1 CURR_DIR=`pwd` if [[ `basename $CURR_DIR` != "tools" ]] ; then @@ -106,6 +103,20 @@ make_binary_release() { cd flink-$RELEASE_VERSION-bin-$NAME # make distribution $MVN clean package $FLAGS -DskipTests + + # Check that the uberjar is not too big + UBERJAR=`find . | grep flink-dist | head -n 1` + if [ -z "$UBERJAR" ] ; then + echo "Uberjar not found. Assuming failed build"; + else + jar tf $UBERJAR | wc -l > num_files_in_uberjar + NUM_FILES_IN_UBERJAR=`cat num_files_in_uberjar` + echo "Files in uberjar: $NUM_FILES_IN_UBERJAR. Uberjar: $UBERJAR" + if [ "$NUM_FILES_IN_UBERJAR" -ge "65536" ] ; then + echo "The number of files in the uberjar ($NUM_FILES_IN_UBERJAR) exceeds the maximum number of possible files for Java 6 (65536)" + exit 1 + fi + fi cd flink-dist/target/flink-$RELEASE_VERSION-bin/ tar cvzf flink-$RELEASE_VERSION-bin-$NAME.tgz flink-$RELEASE_VERSION if [ -d "flink-yarn-$RELEASE_VERSION" ] ; then diff --git a/tools/travis_mvn_watchdog.sh b/tools/travis_mvn_watchdog.sh index 936f8c7f94091..d6f3bccd6f315 100755 --- a/tools/travis_mvn_watchdog.sh +++ b/tools/travis_mvn_watchdog.sh @@ -200,7 +200,7 @@ upload_artifacts_s3 cd ../../ -UBERJAR=`find . | grep uberjar | head -n 1` +UBERJAR=`find . | grep flink-dist | head -n 1` if [ -z "$UBERJAR" ] ; then echo "Uberjar not found. Assuming failed build"; else