Skip to content

Commit

Permalink
[SPARK-31979] Release script should not fail when remove non-existing…
Browse files Browse the repository at this point in the history
… files

### What changes were proposed in this pull request?

When removing non-existing files in the release script, do not fail.

### Why are the changes needed?

This is to make the release script more robust, as we don't care if the files exist before we remove them.

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

tested when cutting 3.0.0 RC

Closes apache#28815 from cloud-fan/release.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 28f131f)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
cloud-fan authored and dongjoon-hyun committed Jun 15, 2020
1 parent 96f0d49 commit 552594d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dev/create-release/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fi
DEST_DIR_NAME="$SPARK_PACKAGE_VERSION"

git clean -d -f -x
rm .gitignore
rm -f .gitignore
cd ..

if [[ "$1" == "package" ]]; then
Expand All @@ -174,9 +174,9 @@ if [[ "$1" == "package" ]]; then

# For source release in v2.4+, exclude copy of binary license/notice
if [[ $SPARK_VERSION > "2.4" ]]; then
rm spark-$SPARK_VERSION/LICENSE-binary
rm spark-$SPARK_VERSION/NOTICE-binary
rm -r spark-$SPARK_VERSION/licenses-binary
rm -f spark-$SPARK_VERSION/LICENSE-binary
rm -f spark-$SPARK_VERSION/NOTICE-binary
rm -rf spark-$SPARK_VERSION/licenses-binary
fi

tar cvzf spark-$SPARK_VERSION.tgz --exclude spark-$SPARK_VERSION/.git spark-$SPARK_VERSION
Expand Down

0 comments on commit 552594d

Please sign in to comment.