This is an automated email from the ASF dual-hosted git repository.
wayne pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new dfb711ff06 feat: Add dependency checks to verify-release-candidate
script (#15009)
dfb711ff06 is described below
commit dfb711ff0692733eaae8a08c99ab20e08962ce87
Author: Ruihang Xia <[email protected]>
AuthorDate: Wed Mar 5 09:14:07 2025 -0800
feat: Add dependency checks to verify-release-candidate script (#15009)
Signed-off-by: Ruihang Xia <[email protected]>
---
dev/release/verify-release-candidate.sh | 34 +++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/dev/release/verify-release-candidate.sh
b/dev/release/verify-release-candidate.sh
index a053569dcb..9ecbe1bc17 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -18,6 +18,37 @@
# under the License.
#
+# Check that required dependencies are installed
+check_dependencies() {
+ local missing_deps=0
+ local required_deps=("curl" "git" "gpg" "cc" "protoc")
+
+ # Either shasum or sha256sum/sha512sum are required
+ local has_sha_tools=0
+
+ for dep in "${required_deps[@]}"; do
+ if ! command -v $dep &> /dev/null; then
+ echo "Error: $dep is not installed or not in PATH"
+ missing_deps=1
+ fi
+ done
+
+ # Check for either shasum or sha256sum/sha512sum
+ if command -v shasum &> /dev/null; then
+ has_sha_tools=1
+ elif command -v sha256sum &> /dev/null && command -v sha512sum &> /dev/null;
then
+ has_sha_tools=1
+ else
+ echo "Error: Neither shasum nor sha256sum/sha512sum are installed or in
PATH"
+ missing_deps=1
+ fi
+
+ if [ $missing_deps -ne 0 ]; then
+ echo "Please install missing dependencies and try again"
+ exit 1
+ fi
+}
+
case $# in
2) VERSION="$1"
RC_NUMBER="$2"
@@ -31,6 +62,9 @@ set -e
set -x
set -o pipefail
+# Add the dependency check early in the script execution
+check_dependencies
+
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
ARROW_DIR="$(dirname $(dirname ${SOURCE_DIR}))"
ARROW_DIST_URL='https://dist.apache.org/repos/dist/dev/datafusion'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]