From fcc8265f20caa4bfc5b4dca41f430718ef4744cc Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 15 Dec 2016 15:46:49 -0800 Subject: [PATCH 1/2] Only rename SparkR tar.gz if names mismatch --- dev/make-distribution.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index 4da7d573849f8..f53a2b41004cf 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -229,7 +229,9 @@ if [ "$MAKE_R" == "true" ]; then # Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh # Make a copy of R source package matching the Spark release version. - cp $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz + if [ "$R_PACKAGE_VERSION" != "$VERSION" ]; then + cp $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz + fi popd > /dev/null else echo "Skipping building R source package" From 95ac2278dbfc358f0073ef10664a709dade87845 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Thu, 15 Dec 2016 16:05:28 -0800 Subject: [PATCH 2/2] Use mv --- dev/make-distribution.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index f53a2b41004cf..da44748e5810e 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -228,10 +228,8 @@ if [ "$MAKE_R" == "true" ]; then # Install source package to get it to generate vignettes, etc. # Do not source the check-cran.sh - it should be run from where it is for it to set SPARK_HOME NO_TESTS=1 CLEAN_INSTALL=1 "$SPARK_HOME/"R/check-cran.sh - # Make a copy of R source package matching the Spark release version. - if [ "$R_PACKAGE_VERSION" != "$VERSION" ]; then - cp $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz - fi + # Move R source package to file name matching the Spark release version. + mv $SPARK_HOME/R/SparkR_"$R_PACKAGE_VERSION".tar.gz $SPARK_HOME/R/SparkR_"$VERSION".tar.gz popd > /dev/null else echo "Skipping building R source package"