Mmuzaf commented on code in PR #32:
URL: https://github.com/apache/cassandra-builds/pull/32#discussion_r1272464191


##########
cassandra-release/cassandra-check-release.sh:
##########
@@ -0,0 +1,271 @@
+#!/bin/bash
+
+# Parameters
+# $1 release
+# $2 maven artefacts url (as specified in the vote email)
+#
+# Example use: `./cassandra-check-release.sh 4.0-beta3 
https://repository.apache.org/content/repositories/orgapachecassandra-1224/org/apache/cassandra/cassandra-all/4.0-beta3/`
+#
+# This script is very basic and experimental. I beg of you to help improve it.
+#
+
+###################
+# prerequisites
+
+command -v wget >/dev/null 2>&1 || { echo >&2 "wget needs to be installed"; 
exit 1; }
+command -v gpg >/dev/null 2>&1 || { echo >&2 "gpg needs to be installed"; exit 
1; }
+command -v sha1sum >/dev/null 2>&1 || { echo >&2 "sha1sum needs to be 
installed"; exit 1; }
+command -v md5sum >/dev/null 2>&1 || { echo >&2 "md5sum needs to be 
installed"; exit 1; }
+command -v sha256sum >/dev/null 2>&1 || { echo >&2 "sha256sum needs to be 
installed"; exit 1; }
+command -v sha512sum >/dev/null 2>&1 || { echo >&2 "sha512sum needs to be 
installed"; exit 1; }
+command -v tar >/dev/null 2>&1 || { echo >&2 "tar needs to be installed"; exit 
1; }
+command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 
1; }
+command -v timeout >/dev/null 2>&1 || { echo >&2 "timeout needs to be 
installed"; exit 1; }
+command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs to be 
installed"; exit 1; }
+(docker info >/dev/null 2>&1) || { echo >&2 "docker needs to running"; exit 1; 
}
+(java -version 2>&1 | grep -q "1.8") || { echo >&2 "Java 8 must be used"; exit 
1; }
+(java -version 2>&1 | grep -iq jdk ) || { echo >&2 "Java JDK must be used"; 
exit 1; }
+(curl --output /dev/null --silent --head --fail 
"https://dist.apache.org/repos/dist/dev/cassandra/$1/";) || { echo >&2 "Not 
Found: https://dist.apache.org/repos/dist/dev/cassandra/$1/";; exit 1; }
+(curl --output /dev/null --silent --head --fail "$2") || { echo >&2 "Not 
Found: $2"; exit 1; }
+
+###################
+
+mkdir -p /tmp/$1
+cd /tmp/$1
+echo "Downloading KEYS"
+wget -q https://downloads.apache.org/cassandra/KEYS
+echo "Downloading $2"
+wget -Nqnd -e robots=off --recursive --no-parent $2
+echo "Downloading https://dist.apache.org/repos/dist/dev/cassandra/$1/";
+wget -Nqe robots=off --recursive --no-parent 
https://dist.apache.org/repos/dist/dev/cassandra/$1/
+
+echo
+echo "====== CHECK RESULTS ======"
+echo
+
+gpg --import KEYS

Review Comment:
   I think it spoils the local `gpg` agent in case we don't want to import all 
the keys locally, so it should probably run inside a docker or we can prepare a 
docker image to do all checks :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to