Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19754#discussion_r151158121
--- Diff: dev/create-release/release-build.sh ---
@@ -135,50 +143,24 @@ if [ -z "$SPARK_PACKAGE_VERSION" ]; then
SPARK_PACKAGE_VERSION="${SPARK_VERSION}-$(date
+%Y_%m_%d_%H_%M)-${git_hash}"
fi
-DEST_DIR_NAME="spark-$SPARK_PACKAGE_VERSION"
-
-function LFTP {
- SSH="ssh -o ConnectTimeout=300 -o StrictHostKeyChecking=no -i
$ASF_RSA_KEY"
- COMMANDS=$(cat <<EOF
- set net:max-retries 2 &&
- set sftp:connect-program $SSH &&
- connect -u $ASF_USERNAME,p sftp://home.apache.org &&
- $@
-EOF
-)
- lftp --norc -c "$COMMANDS"
-}
-export -f LFTP
-
+DEST_DIR_NAME="$SPARK_PACKAGE_VERSION"
git clean -d -f -x
rm .gitignore
rm -rf .git
cd ..
-if [ -n "$REMOTE_PARENT_MAX_LENGTH" ]; then
- old_dirs=$(
- LFTP nlist $REMOTE_PARENT_DIR \
- | grep -v "^\." \
- | sort -r \
- | tail -n +$REMOTE_PARENT_MAX_LENGTH)
- for old_dir in $old_dirs; do
- echo "Removing directory: $old_dir"
- LFTP "rm -rf $REMOTE_PARENT_DIR/$old_dir && exit 0"
- done
-fi
-
if [[ "$1" == "package" ]]; then
# Source and binary tarballs
- echo "Packaging release tarballs"
+ echo "Packaging release source tarballs"
cp -r spark spark-$SPARK_VERSION
tar cvzf spark-$SPARK_VERSION.tgz spark-$SPARK_VERSION
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour --output
spark-$SPARK_VERSION.tgz.asc \
--detach-sig spark-$SPARK_VERSION.tgz
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --print-md MD5
spark-$SPARK_VERSION.tgz > \
spark-$SPARK_VERSION.tgz.md5
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --print-md \
- SHA512 spark-$SPARK_VERSION.tgz > spark-$SPARK_VERSION.tgz.sha
+ SHA512 spark-$SPARK_VERSION.tgz > spark-$SPARK_VERSION.tgz.sha512
--- End diff --
+1 for making it explicit as sha will often default to SHA1
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]