Skip to content

Commit 6e661b7

Browse files
committed
add hint message on installing xmllint before running scripts
1 parent 2ba5d2e commit 6e661b7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

dev-support/create-release/release-util.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ function get_api_diff_version {
138138
# Get all branches that begin with 'branch-', the hbase convention for
139139
# release branches, sort them and then pop off the most recent.
140140
function get_release_info {
141+
init_xmllint
142+
141143
PROJECT="$(read_config "PROJECT" "$PROJECT")"
142144
export PROJECT
143145

@@ -355,6 +357,17 @@ function init_locale {
355357
export LANG="$locale_value"
356358
}
357359

360+
# Check whether xmllint is available
361+
function init_xmllint {
362+
if ! [ -x "$(command -v xmllint)" ]; then
363+
log "Error: xmllint is not available, we need to use it for parsing pom.xml." >&2
364+
log "Ubuntu: apt install libxml2-utils"
365+
log "CentOS: yum install xmlstarlet"
366+
log "Mac OS: brew install xmlstarlet"
367+
exit 1
368+
fi
369+
}
370+
358371
# Initializes JAVA_VERSION to the version of the JVM in use.
359372
function init_java {
360373
if [ -z "$JAVA_HOME" ]; then

0 commit comments

Comments
 (0)