Apache DataFusion SQL Query Engine
feat: Add dependency checks to verify-release-candidate script (#15009)
Ruihang Xiadfb711ff0692
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.shindex 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 $# in2) VERSION="$1"RC_NUMBER="$2"@@ -31,6 +62,9 @@ set -eset -xset -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'